diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2010-04-13 05:23:28 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2010-04-13 05:23:28 (GMT) |
commit | 7fba97dc74a27f836abfcf4941dac6e247379798 (patch) | |
tree | ad54e31c2650593c742652c75a73f984c2111e08 /src/openvg | |
parent | 36e8506084f272a01cfdc50ab787e9d30da60360 (diff) | |
parent | bae8e41ff7d12ac10f69a4f03d97e736dace500d (diff) | |
download | Qt-7fba97dc74a27f836abfcf4941dac6e247379798.zip Qt-7fba97dc74a27f836abfcf4941dac6e247379798.tar.gz Qt-7fba97dc74a27f836abfcf4941dac6e247379798.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Conflicts:
tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp
Diffstat (limited to 'src/openvg')
-rw-r--r-- | src/openvg/qwindowsurface_vgegl.cpp | 24 |
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; } |