summaryrefslogtreecommitdiffstats
path: root/src/openvg
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-04-12 15:39:28 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-04-12 15:39:28 (GMT)
commit3723f30a91eda1c1b247598913cfc02b001a02c9 (patch)
tree234241d0d6dbbf29857c4e66d2723f77239f31ee /src/openvg
parent6f736694461edc25b6e757f40ab9cad6a9207ad4 (diff)
parent957f36cb498657f94f1b5b92f52713254ff8c051 (diff)
downloadQt-3723f30a91eda1c1b247598913cfc02b001a02c9.zip
Qt-3723f30a91eda1c1b247598913cfc02b001a02c9.tar.gz
Qt-3723f30a91eda1c1b247598913cfc02b001a02c9.tar.bz2
Merge remote branch 'origin/4.6' into qt-4.7-from-4.6
Conflicts: qmake/generators/symbian/symmake.cpp src/gui/image/qimage.cpp src/openvg/qwindowsurface_vgegl.cpp
Diffstat (limited to 'src/openvg')
-rw-r--r--src/openvg/qwindowsurface_vgegl.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/openvg/qwindowsurface_vgegl.cpp b/src/openvg/qwindowsurface_vgegl.cpp
index 9b55fd2..13ae807 100644
--- a/src/openvg/qwindowsurface_vgegl.cpp
+++ b/src/openvg/qwindowsurface_vgegl.cpp
@@ -659,6 +659,7 @@ QEglContext *QVGEGLWindowSurfaceDirect::ensureContext(QWidget *widget)
#endif
windowSurface = context->createSurface(widget, &surfaceProps);
isPaintingActive = false;
+ needToSwap = true;
}
#else
if (context && size != newSize) {
@@ -710,20 +711,21 @@ QEglContext *QVGEGLWindowSurfaceDirect::ensureContext(QWidget *widget)
needToSwap = false;
}
#endif
-#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(), surface,
- EGL_SWAP_BEHAVIOR, EGL_BUFFER_PRESERVED);
- if (eglGetError() != EGL_SUCCESS) {
- qWarning("QVG: could not enable preserved swap");
- }
- }
-#endif
windowSurface = surface;
isPaintingActive = false;
}
+
+#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,
+ EGL_SWAP_BEHAVIOR, EGL_BUFFER_PRESERVED);
+ if (eglGetError() != EGL_SUCCESS) {
+ qWarning("QVG: could not enable preserved swap");
+ }
+ }
+#endif
return context;
}