Disable threaded rendering for Intel HD 3000 cards.

Task-number: QTBUG-34492
Change-Id: I1848cde3fb9517679fd54a7170ed5bee40880edc
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
This commit is contained in:
Gunnar Sletta 2013-11-05 09:32:35 +01:00 committed by The Qt Project
parent 0cdf2a8023
commit e7fd798af0

View File

@ -411,6 +411,16 @@ bool QGLXContext::isValid() const
bool QGLXContext::m_queriedDummyContext = false; bool QGLXContext::m_queriedDummyContext = false;
bool QGLXContext::m_supportsThreading = true; 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() void QGLXContext::queryDummyContext()
{ {
if (m_queriedDummyContext) if (m_queriedDummyContext)
@ -428,10 +438,14 @@ void QGLXContext::queryDummyContext()
context.makeCurrent(&surface); context.makeCurrent(&surface);
const char *renderer = (const char *) glGetString(GL_RENDERER); const char *renderer = (const char *) glGetString(GL_RENDERER);
if (QByteArray(renderer).contains("Chromium"))
m_supportsThreading = false; m_supportsThreading = true;
else for (int i = 0; qglx_threadedgl_blacklist[i]; ++i) {
m_supportsThreading = true; if (strstr(renderer, qglx_threadedgl_blacklist[i]) != 0) {
m_supportsThreading = false;
break;
}
}
} }
bool QGLXContext::supportsThreading() bool QGLXContext::supportsThreading()