summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@digia.com>2013-11-05 09:32:35 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-06 00:35:43 +0100
commite7fd798af001e2c4e323f5ae90e4e994f12ccf33 (patch)
tree187075073cef76485fa55cb7b2d0158a97877a49 /src
parent0cdf2a8023473e03121fc99194182a3fb86dd6aa (diff)
Disable threaded rendering for Intel HD 3000 cards.
Task-number: QTBUG-34492 Change-Id: I1848cde3fb9517679fd54a7170ed5bee40880edc Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/xcb/qglxintegration.cpp22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/plugins/platforms/xcb/qglxintegration.cpp b/src/plugins/platforms/xcb/qglxintegration.cpp
index 2c418cbebe..4ac4cf21ab 100644
--- a/src/plugins/platforms/xcb/qglxintegration.cpp
+++ b/src/plugins/platforms/xcb/qglxintegration.cpp
@@ -411,6 +411,16 @@ bool QGLXContext::isValid() const
bool QGLXContext::m_queriedDummyContext = false;
bool QGLXContext::m_supportsThreading = true;
+
+// If this list grows to any significant size, change it a
+// proper string table and make the implementation below use
+// binary search.
+static const char *qglx_threadedgl_blacklist[] = {
+ "Chromium", // QTBUG-32225 (initialization fails)
+ "Mesa DRI Intel(R) Sandybridge Mobile", // QTBUG-34492 (flickering in fullscreen)
+ 0
+};
+
void QGLXContext::queryDummyContext()
{
if (m_queriedDummyContext)
@@ -428,10 +438,14 @@ void QGLXContext::queryDummyContext()
context.makeCurrent(&surface);
const char *renderer = (const char *) glGetString(GL_RENDERER);
- if (QByteArray(renderer).contains("Chromium"))
- m_supportsThreading = false;
- else
- m_supportsThreading = true;
+
+ m_supportsThreading = true;
+ for (int i = 0; qglx_threadedgl_blacklist[i]; ++i) {
+ if (strstr(renderer, qglx_threadedgl_blacklist[i]) != 0) {
+ m_supportsThreading = false;
+ break;
+ }
+ }
}
bool QGLXContext::supportsThreading()