summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/qnx/qqnxglcontext.h
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer.qnx@kdab.com>2012-06-28 08:50:34 +0100
committerQt by Nokia <qt-info@nokia.com>2012-07-03 00:40:58 +0200
commitca456f34b0a7c6229f43bb932b3aaa2d15ce8740 (patch)
treeb6a7f2d69b07a72ece8addea2f35a36ec94fc8d5 /src/plugins/platforms/qnx/qqnxglcontext.h
parentab2fb14b466173a5230d07a768f46203eb9ae08a (diff)
QNX: Enable threaded OpenGL rendering on QNX
The only complicated aspect to this was deferring EGLsurface re-creation as a result of window geometry changes (e.g. when we receive an orientation change event). To allow this to be done in a controlled way we defer the surface manipulation until the next call to QQnxGLContext::makeCurrent(). Change-Id: I8062d3e4d19220a822fbc3b8ca563bb1e3be09d0 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/plugins/platforms/qnx/qqnxglcontext.h')
-rw-r--r--src/plugins/platforms/qnx/qqnxglcontext.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/platforms/qnx/qqnxglcontext.h b/src/plugins/platforms/qnx/qqnxglcontext.h
index 219c48f8b3..de03f3ec0c 100644
--- a/src/plugins/platforms/qnx/qqnxglcontext.h
+++ b/src/plugins/platforms/qnx/qqnxglcontext.h
@@ -44,6 +44,7 @@
#include <qpa/qplatformopenglcontext.h>
#include <QtGui/QSurfaceFormat>
+#include <QtCore/QAtomicInt>
#include <QtCore/QSize>
#include <EGL/egl.h>
@@ -61,6 +62,8 @@ public:
static void initialize();
static void shutdown();
+ void requestSurfaceChange();
+
bool makeCurrent(QPlatformSurface *surface);
void doneCurrent();
void swapBuffers(QPlatformSurface *surface);
@@ -84,6 +87,8 @@ private:
EGLContext m_eglContext;
EGLSurface m_eglSurface;
+ QAtomicInt m_newSurfaceRequested;
+
static EGLint *contextAttrs();
};