summaryrefslogtreecommitdiffstats
path: root/src/openvg
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-10-07 14:33:23 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-10-07 14:33:23 (GMT)
commitffc4b43af90e5a4cb73ac2003a06f78c1d70d435 (patch)
tree10aa32055188684ee6924bb6f9f7cd386c170116 /src/openvg
parent91efdcaed6fe9e931b049460d9a177a4c4e5ac3e (diff)
parent8082a800a55875fd2e64cf2ab5c6fa2c26722132 (diff)
downloadQt-ffc4b43af90e5a4cb73ac2003a06f78c1d70d435.zip
Qt-ffc4b43af90e5a4cb73ac2003a06f78c1d70d435.tar.gz
Qt-ffc4b43af90e5a4cb73ac2003a06f78c1d70d435.tar.bz2
Merge branch 4.7 into qt-master-from-4.7
Diffstat (limited to 'src/openvg')
-rw-r--r--src/openvg/qwindowsurface_vgegl.cpp5
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");
}
}