diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-03-07 12:55:27 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-03-07 12:55:27 (GMT) |
commit | 2e5edf27acc6eb522d4036de9f82896228887d55 (patch) | |
tree | bf7019bbdc7f128b3c2adf7b2235c8f1b3ee800f /tools | |
parent | dda11ee48e323f4f4c6490822aa8921d5d6e3e69 (diff) | |
parent | d55aa14630bbb4130017f38177b20c850d556371 (diff) | |
download | Qt-2e5edf27acc6eb522d4036de9f82896228887d55.zip Qt-2e5edf27acc6eb522d4036de9f82896228887d55.tar.gz Qt-2e5edf27acc6eb522d4036de9f82896228887d55.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
Invalidate the EGL surface of QMeeGoLivePixmapData when switching to Raster
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp | 2 | ||||
-rw-r--r-- | tools/qmeegographicssystemhelper/qmeegoruntime.cpp | 12 | ||||
-rw-r--r-- | tools/qmeegographicssystemhelper/qmeegoruntime.h | 1 |
3 files changed, 14 insertions, 1 deletions
diff --git a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp index e1c0460..ac32995 100644 --- a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp +++ b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp @@ -111,6 +111,8 @@ void QMeeGoGraphicsSystemHelper::switchToRaster() QApplication *app = static_cast<QApplication *>(QCoreApplication::instance()); app->setGraphicsSystem(QLatin1String("raster")); + QMeeGoRuntime::invalidateLiveSurfaces(); + QMeeGoSwitchEvent didSwitchEvent(QLatin1String("raster"), QMeeGoSwitchEvent::DidSwitch); foreach (QWidget *widget, QApplication::topLevelWidgets()) QCoreApplication::sendEvent(widget, &didSwitchEvent); diff --git a/tools/qmeegographicssystemhelper/qmeegoruntime.cpp b/tools/qmeegographicssystemhelper/qmeegoruntime.cpp index c32b654..7c81d51 100644 --- a/tools/qmeegographicssystemhelper/qmeegoruntime.cpp +++ b/tools/qmeegographicssystemhelper/qmeegoruntime.cpp @@ -65,6 +65,7 @@ typedef bool (*QMeeGoLiveTextureReleaseFunc) (QPixmap*, QImage *i); typedef Qt::HANDLE (*QMeeGoLiveTextureGetHandleFunc) (QPixmap*); typedef void* (*QMeeGoCreateFenceSyncFunc) (void); typedef void (*QMeeGoDestroyFenceSyncFunc) (void *fs); +typedef void (*QMeeGoInvalidateLiveSurfacesFunc) (void); static QMeeGoImageToEglSharedImageFunc qt_meego_image_to_egl_shared_image = NULL; static QMeeGoPixmapDataFromEglSharedImageFunc qt_meego_pixmapdata_from_egl_shared_image = NULL; @@ -81,6 +82,7 @@ static QMeeGoLiveTextureReleaseFunc qt_meego_live_texture_release = NULL; static QMeeGoLiveTextureGetHandleFunc qt_meego_live_texture_get_handle = NULL; static QMeeGoCreateFenceSyncFunc qt_meego_create_fence_sync = NULL; static QMeeGoDestroyFenceSyncFunc qt_meego_destroy_fence_sync = NULL; +static QMeeGoInvalidateLiveSurfacesFunc qt_meego_invalidate_live_surfaces = NULL; void QMeeGoRuntime::initialize() { @@ -109,13 +111,14 @@ void QMeeGoRuntime::initialize() qt_meego_live_texture_get_handle = (QMeeGoLiveTextureGetHandleFunc) library.resolve("qt_meego_live_texture_get_handle"); qt_meego_create_fence_sync = (QMeeGoCreateFenceSyncFunc) library.resolve("qt_meego_create_fence_sync"); qt_meego_destroy_fence_sync = (QMeeGoDestroyFenceSyncFunc) library.resolve("qt_meego_destroy_fence_sync"); + qt_meego_invalidate_live_surfaces = (QMeeGoInvalidateLiveSurfacesFunc) library.resolve("qt_meego_invalidate_live_surfaces"); if (qt_meego_image_to_egl_shared_image && qt_meego_pixmapdata_from_egl_shared_image && qt_meego_pixmapdata_with_gl_texture && qt_meego_destroy_egl_shared_image && qt_meego_update_egl_shared_image_pixmap && qt_meego_set_surface_fixed_size && qt_meego_set_surface_scaling && qt_meego_set_translucent && qt_meego_pixmapdata_with_new_live_texture && qt_meego_pixmapdata_from_live_texture_handle && qt_meego_live_texture_lock && qt_meego_live_texture_release && qt_meego_live_texture_get_handle && - qt_meego_create_fence_sync && qt_meego_destroy_fence_sync) + qt_meego_create_fence_sync && qt_meego_destroy_fence_sync && qt_meego_invalidate_live_surfaces) { qDebug("Successfully resolved MeeGo graphics system: %s %s\n", qPrintable(libraryPrivate->fileName), qPrintable(libraryPrivate->fullVersion)); } else { @@ -232,3 +235,10 @@ void QMeeGoRuntime::destroyFenceSync(void *fs) Q_ASSERT(qt_meego_destroy_fence_sync); qt_meego_destroy_fence_sync(fs); } + +void QMeeGoRuntime::invalidateLiveSurfaces() +{ + ENSURE_INITIALIZED; + Q_ASSERT(qt_meego_invalidate_live_surfaces); + qt_meego_invalidate_live_surfaces(); +} diff --git a/tools/qmeegographicssystemhelper/qmeegoruntime.h b/tools/qmeegographicssystemhelper/qmeegoruntime.h index bdc4eef..b91efae 100644 --- a/tools/qmeegographicssystemhelper/qmeegoruntime.h +++ b/tools/qmeegographicssystemhelper/qmeegoruntime.h @@ -62,6 +62,7 @@ public: static Qt::HANDLE getLiveTextureHandle(QPixmap *pixmap); static void* createFenceSync(); static void destroyFenceSync(void *fs); + static void invalidateLiveSurfaces(); private: static bool initialized; |