summaryrefslogtreecommitdiffstats
path: root/src/gui/egl/qegl.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-08-05 13:23:02 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-08-05 13:23:02 (GMT)
commit059a2ff8d621d9c67e3a97969d34edb6e173a4f3 (patch)
treec8a25b0077d37b30dec377dc552a60799c838a2e /src/gui/egl/qegl.cpp
parent8dde027451601ff82793a0f4f146ec0ae5932893 (diff)
parent270c644937fb402332671208435ac600b280e5b8 (diff)
downloadQt-059a2ff8d621d9c67e3a97969d34edb6e173a4f3.zip
Qt-059a2ff8d621d9c67e3a97969d34edb6e173a4f3.tar.gz
Qt-059a2ff8d621d9c67e3a97969d34edb6e173a4f3.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: Fix compile errors on S60 3.2 Fix to QGLWidget rendering with VG graphics system
Diffstat (limited to 'src/gui/egl/qegl.cpp')
-rw-r--r--src/gui/egl/qegl.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp
index d9c5ea2..4db4a6a 100644
--- a/src/gui/egl/qegl.cpp
+++ b/src/gui/egl/qegl.cpp
@@ -94,6 +94,7 @@ QEglContext::QEglContext()
, current(false)
, ownsContext(true)
, sharing(false)
+ , apiChanged(false)
{
QEglContextTracker::ref();
}
@@ -435,9 +436,20 @@ bool QEglContext::makeCurrent(EGLSurface surface)
return false;
}
+#ifdef Q_OS_SYMBIAN
+ apiChanged = false;
+ if (currentContext(apiType)
+ && currentContext(apiType)->ctx != eglGetCurrentContext()) {
+ // some other EGL based API active. Complete its rendering
+ eglWaitClient();
+ apiChanged = true;
+ }
+#endif
+
// If lazyDoneCurrent() was called on the surface, then we may be able
// to assume that it is still current within the thread.
- if (surface == currentSurface && currentContext(apiType) == this) {
+ if (surface == currentSurface && currentContext(apiType) == this
+ && !apiChanged) {
current = true;
return true;
}
@@ -512,6 +524,13 @@ bool QEglContext::swapBuffers(EGLSurface surface)
bool ok = eglSwapBuffers(QEgl::display(), surface);
if (!ok)
qWarning() << "QEglContext::swapBuffers():" << QEgl::errorString();
+
+#ifdef Q_OS_SYMBIAN
+ if (apiChanged) {
+ eglWaitClient();
+ apiChanged = false;
+ }
+#endif
return ok;
}