diff options
Diffstat (limited to 'src/plugins/graphicssystems/meego/qmeegolivepixmapdata.cpp')
-rw-r--r-- | src/plugins/graphicssystems/meego/qmeegolivepixmapdata.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/plugins/graphicssystems/meego/qmeegolivepixmapdata.cpp b/src/plugins/graphicssystems/meego/qmeegolivepixmapdata.cpp index 405b765..16096c9 100644 --- a/src/plugins/graphicssystems/meego/qmeegolivepixmapdata.cpp +++ b/src/plugins/graphicssystems/meego/qmeegolivepixmapdata.cpp @@ -40,7 +40,6 @@ ****************************************************************************/ #include "qmeegolivepixmapdata.h" -#include "qmeegoextensions.h" #include "qmeegorasterpixmapdata.h" #include <private/qimage_p.h> #include <private/qwindowsurface_gl_p.h> @@ -171,11 +170,18 @@ QPixmapData *QMeeGoLivePixmapData::createCompatiblePixmapData() const return new QMeeGoRasterPixmapData(pixelType()); } -QImage* QMeeGoLivePixmapData::lock() +QImage* QMeeGoLivePixmapData::lock(EGLSyncKHR fenceSync) { QGLShareContextScope ctx(qt_gl_share_widget()->context()); QMeeGoExtensions::ensureInitialized(); + if (fenceSync) { + QMeeGoExtensions::eglClientWaitSyncKHR(QEgl::display(), + fenceSync, + EGL_SYNC_FLUSH_COMMANDS_BIT_KHR, + EGL_FOREVER_KHR); + } + void *data = 0; int pitch = 0; EGLSurface surface = 0; @@ -214,7 +220,6 @@ bool QMeeGoLivePixmapData::release(QImage* /*img*/) if (QMeeGoExtensions::eglUnlockSurfaceKHR(QEgl::display(), getSurfaceForBackingPixmap())) { lockedImage = QImage(); - glFinish(); return true; } else { lockedImage = QImage(); @@ -229,7 +234,7 @@ Qt::HANDLE QMeeGoLivePixmapData::handle() bool QMeeGoLivePixmapData::scroll(int dx, int dy, const QRect &rect) { - lock(); + lock(NULL); if (!lockedImage.isNull()) qt_scrollRectInImage(lockedImage, rect, QPoint(dx, dy)); |