From 8669823d5a5c0f26ff3909ad9c83fa99a63a89f3 Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Fri, 23 Apr 2010 15:08:17 +0200 Subject: 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 --- src/opengl/qwindowsurface_gl.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 #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; }; -- cgit v0.12