diff options
author | Morten Engvoldsen <morten.engvoldsen@nokia.com> | 2010-10-07 19:23:54 (GMT) |
---|---|---|
committer | Morten Engvoldsen <morten.engvoldsen@nokia.com> | 2010-10-07 19:23:54 (GMT) |
commit | 4f1d524f992b0df3626ab63c001345c96ccea766 (patch) | |
tree | ddc248c09fbb041b09792dae680b2f494e9b4e4b /src/openvg/qwindowsurface_vgegl.cpp | |
parent | 34c8022c216f6e298b0b0f8250cdf17688534c5b (diff) | |
parent | 161f15e1e79ec5f23244da68340ba1e78f3ac4bb (diff) | |
download | Qt-4f1d524f992b0df3626ab63c001345c96ccea766.zip Qt-4f1d524f992b0df3626ab63c001345c96ccea766.tar.gz Qt-4f1d524f992b0df3626ab63c001345c96ccea766.tar.bz2 |
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Diffstat (limited to 'src/openvg/qwindowsurface_vgegl.cpp')
-rw-r--r-- | src/openvg/qwindowsurface_vgegl.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/openvg/qwindowsurface_vgegl.cpp b/src/openvg/qwindowsurface_vgegl.cpp index e3f52f4e..37e5f40 100644 --- a/src/openvg/qwindowsurface_vgegl.cpp +++ b/src/openvg/qwindowsurface_vgegl.cpp @@ -709,10 +709,9 @@ QEglContext *QVGEGLWindowSurfaceDirect::ensureContext(QWidget *widget) #if !defined(QVG_NO_PRESERVED_SWAP) // Try to force the surface back buffer to preserve its contents. if (needToSwap) { - eglGetError(); // Clear error state first. - eglSurfaceAttrib(QEgl::display(), windowSurface, + bool succeeded = eglSurfaceAttrib(QEgl::display(), windowSurface, EGL_SWAP_BEHAVIOR, EGL_BUFFER_PRESERVED); - if (eglGetError() != EGL_SUCCESS) { + if (!succeeded && eglGetError() != EGL_SUCCESS) { qWarning("QVG: could not enable preserved swap"); } } |