diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2011-03-29 10:20:40 (GMT) |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2011-03-29 10:24:48 (GMT) |
commit | afba7910d6805c615c648f938a4fb53a10f0710d (patch) | |
tree | c108759bf1ec9b6d2a932eef7bf9cd67f5d7cd27 | |
parent | a73af692412630e9a25ae1ddb403413f3d8a1de6 (diff) | |
download | Qt-afba7910d6805c615c648f938a4fb53a10f0710d.zip Qt-afba7910d6805c615c648f938a4fb53a10f0710d.tar.gz Qt-afba7910d6805c615c648f938a4fb53a10f0710d.tar.bz2 |
Fixed bad merges in GL windowsurface and get rid of redundant variable.
Reviewed-by: Jani Hautakangas
-rw-r--r-- | src/opengl/qwindowsurface_gl.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp index 3815f7b..77f6103 100644 --- a/src/opengl/qwindowsurface_gl.cpp +++ b/src/opengl/qwindowsurface_gl.cpp @@ -492,7 +492,14 @@ void QGLWindowSurface::hijackWindow(QWidget *widget) qDebug() << "Found EGL_NOK_swap_region2 extension. Using partial updates."; } - d_ptr->destructive_swap_buffers = !swapBehaviourPreserved; + d_ptr->destructive_swap_buffers = true; + if (ctx->d_func()->eglContext->configAttrib(EGL_SURFACE_TYPE)&EGL_SWAP_BEHAVIOR_PRESERVED_BIT) { + EGLint swapBehavior; + if (eglQuerySurface(ctx->d_func()->eglContext->display(), ctx->d_func()->eglSurface + , EGL_SWAP_BEHAVIOR, &swapBehavior)) { + d_ptr->destructive_swap_buffers = (swapBehavior != EGL_BUFFER_PRESERVED); + } + } d_ptr->swap_region_support = haveNOKSwapRegion; #endif @@ -910,7 +917,7 @@ void QGLWindowSurface::updateGeometry() { ctx->d_func()->eglContext->config()); eglGetError(); // Clear error state. - if (hasPartialUpdateSupport()) { + if (!d_ptr->destructive_swap_buffers) { eglSurfaceAttrib(ctx->d_func()->eglContext->display(), ctx->d_func()->eglSurface, EGL_SWAP_BEHAVIOR, EGL_BUFFER_PRESERVED); |