summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2010-04-23 13:08:17 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2010-04-26 06:26:00 (GMT)
commit8669823d5a5c0f26ff3909ad9c83fa99a63a89f3 (patch)
tree7cb3debd914bc9055f17a647e8c7edd0827639dd /src/opengl
parent03ca1537aa8bebda43f3d95b559e5b35372c1d88 (diff)
downloadQt-8669823d5a5c0f26ff3909ad9c83fa99a63a89f3.zip
Qt-8669823d5a5c0f26ff3909ad9c83fa99a63a89f3.tar.gz
Qt-8669823d5a5c0f26ff3909ad9c83fa99a63a89f3.tar.bz2
Force full-screen updates for QGLWindowSurface
If the back buffer is destroyed when swap buffers is called, we must tell the backing store any update needs to invalidate the entire window surface, so everything gets re-drawn. Task-number: QTBUG-9978 Reviewed-By: Trond
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/qwindowsurface_gl.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp
index b693245..bcb96fa 100644
--- a/src/opengl/qwindowsurface_gl.cpp
+++ b/src/opengl/qwindowsurface_gl.cpp
@@ -82,7 +82,7 @@
#define GLX_SAMPLES_ARB 100001
#endif
-#ifdef QT_OPENGL_ES
+#ifndef QT_NO_EGL
#include <private/qeglcontext_p.h>
#endif
@@ -354,6 +354,11 @@ void QGLWindowSurface::hijackWindow(QWidget *widget)
QGLContext *ctx = new QGLContext(surfaceFormat, widget);
ctx->create(qt_gl_share_widget()->context());
+#ifndef QT_NO_EGL
+ if (ctx->d_func()->eglContext->configAttrib(EGL_SWAP_BEHAVIOR) != EGL_BUFFER_PRESERVED)
+ setPartialUpdateSupport(false); // Force full-screen updates
+#endif
+
widgetPrivate->extraData()->glContext = ctx;
union { QGLContext **ctxPtr; void **voidPtr; };