summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-08-25 20:19:44 +0200
committerLars Knoll <lars.knoll@nokia.com>2011-08-26 09:19:09 +0200
commit5a23825f017ddebea698f6f81a36bd7ff7edadc1 (patch)
tree7b531ef0874911ec6bef4084acbb16b3e3b9ca8b /src/plugins/platforms/xcb
parent794c81c1eab54cb58f2143ab3efc90e9c4bf9092 (diff)
Introduce new platform capability ThreadedOpenGL.
Lets the platform plugin advertise whether it's safe to use OpenGL from a different thread. With XCB we only advertise this if we have a reasonably new XCB libary, as older versions suffer from the xcb_wait_for_reply() blocking bug, which cause GL rendering in a separate to stall when using Mesa drivers. Change-Id: I4829df7e583a1c8aed218ae13a159d21266cc594 Reviewed-on: http://codereview.qt.nokia.com/3613 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/plugins/platforms/xcb')
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp
index 75936b2771..54394c9193 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.cpp
+++ b/src/plugins/platforms/xcb/qxcbintegration.cpp
@@ -159,6 +159,12 @@ bool QXcbIntegration::hasCapability(QPlatformIntegration::Capability cap) const
switch (cap) {
case ThreadedPixmaps: return true;
case OpenGL: return true;
+ case ThreadedOpenGL:
+#ifdef XCB_POLL_FOR_QUEUED_EVENT
+ return true;
+#else
+ return false;
+#endif
default: return QPlatformIntegration::hasCapability(cap);
}
}