diff options
author | Liang Qi <liang.qi@nokia.com> | 2011-08-15 14:19:17 (GMT) |
---|---|---|
committer | Liang Qi <liang.qi@nokia.com> | 2011-08-15 14:19:17 (GMT) |
commit | e5fe06c4b76eea0f1755419bfb6b89325824a852 (patch) | |
tree | 3f82e0f4307e3552e5d4ddec7ca05417cbc8c942 /src/gui/egl | |
parent | bda5fd63ae9c1aa16492fad26dcabeffb8bd8db4 (diff) | |
parent | f11bdd5bd0b46f759e4711de1c2c3ef5006433fa (diff) | |
download | Qt-e5fe06c4b76eea0f1755419bfb6b89325824a852.zip Qt-e5fe06c4b76eea0f1755419bfb6b89325824a852.tar.gz Qt-e5fe06c4b76eea0f1755419bfb6b89325824a852.tar.bz2 |
Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7
Conflicts:
examples/webkit/fancybrowser/fancybrowser.pro
src/3rdparty/libpng/ANNOUNCE
src/3rdparty/libpng/CHANGES
src/3rdparty/libpng/CMakeLists.txt
src/3rdparty/libpng/LICENSE
src/3rdparty/libpng/README
src/3rdparty/libpng/configure.ac
src/3rdparty/libpng/example.c
src/3rdparty/libpng/libpng-manual.txt
src/3rdparty/libpng/libpng.3
src/3rdparty/libpng/libpngpf.3
src/3rdparty/libpng/png.5
src/3rdparty/libpng/png.c
src/3rdparty/libpng/png.h
src/3rdparty/libpng/pngconf.h
src/3rdparty/libpng/pngerror.c
src/3rdparty/libpng/pnginfo.h
src/3rdparty/libpng/pnglibconf.h
src/3rdparty/libpng/pngmem.c
src/3rdparty/libpng/pngpread.c
src/3rdparty/libpng/pngpriv.h
src/3rdparty/libpng/pngread.c
src/3rdparty/libpng/pngrtran.c
src/3rdparty/libpng/pngrutil.c
src/3rdparty/libpng/pngset.c
src/3rdparty/libpng/pngstruct.h
src/3rdparty/libpng/pngtest.c
src/3rdparty/libpng/pngtrans.c
src/3rdparty/libpng/pngvalid.c
src/3rdparty/libpng/pngwrite.c
src/3rdparty/libpng/pngwtran.c
src/3rdparty/libpng/pngwutil.c
src/gui/dialogs/qfiledialog_symbian.cpp
src/gui/kernel/qsoftkeymanager.cpp
src/s60installs/s60installs.pro
Diffstat (limited to 'src/gui/egl')
-rw-r--r-- | src/gui/egl/qegl.cpp | 21 | ||||
-rw-r--r-- | src/gui/egl/qeglcontext_p.h | 1 |
2 files changed, 21 insertions, 1 deletions
diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp index 2f2f772..2a37d45 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; } diff --git a/src/gui/egl/qeglcontext_p.h b/src/gui/egl/qeglcontext_p.h index 6cd76b3..0cdaae7 100644 --- a/src/gui/egl/qeglcontext_p.h +++ b/src/gui/egl/qeglcontext_p.h @@ -104,6 +104,7 @@ private: bool current; bool ownsContext; bool sharing; + bool apiChanged; static QEglContext *currentContext(QEgl::API api); static void setCurrentContext(QEgl::API api, QEglContext *context); |