summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qwindowsurface_s60.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/painting/qwindowsurface_s60.cpp')
-rw-r--r--src/gui/painting/qwindowsurface_s60.cpp31
1 files changed, 29 insertions, 2 deletions
diff --git a/src/gui/painting/qwindowsurface_s60.cpp b/src/gui/painting/qwindowsurface_s60.cpp
index b25dce5..477bd93 100644
--- a/src/gui/painting/qwindowsurface_s60.cpp
+++ b/src/gui/painting/qwindowsurface_s60.cpp
@@ -43,10 +43,15 @@
#include <QtGui/qpaintdevice.h>
#include <private/qwidget_p.h>
-#include "qwindowsurface_s60_p.h"
+#include <private/qwindowsurface_s60_p.h>
#include <private/qpixmap_s60_p.h>
#include <private/qt_s60_p.h>
-#include "private/qdrawhelper_p.h"
+#include <private/qapplication_p.h>
+#include <private/qdrawhelper_p.h>
+
+#ifdef QT_GRAPHICSSYSTEM_RUNTIME
+#include <private/qgraphicssystem_runtime_p.h>
+#endif
QT_BEGIN_NAMESPACE
@@ -79,13 +84,35 @@ QS60WindowSurface::QS60WindowSurface(QWidget* widget)
setStaticContentsSupport(true);
}
+
QS60WindowSurface::~QS60WindowSurface()
{
+#if defined(QT_GRAPHICSSYSTEM_RUNTIME) && defined(Q_SYMBIAN_SUPPORTS_SURFACES)
+ if(QApplicationPrivate::runtime_graphics_system) {
+ QRuntimeGraphicsSystem *runtimeGraphicsSystem =
+ static_cast<QRuntimeGraphicsSystem*>(QApplicationPrivate::graphics_system);
+ if(runtimeGraphicsSystem->graphicsSystemName() == QLatin1String("openvg")) {
+
+ // Graphics system has been switched from raster to openvg.
+ // Issue empty redraw to clear the UI surface
+
+ QWidget *w = window();
+ RWindow *const window = static_cast<RWindow *>(w->winId()->DrawableWindow());
+ window->BeginRedraw();
+ window->EndRedraw();
+ }
+ }
+#endif
+
delete d_ptr;
}
void QS60WindowSurface::beginPaint(const QRegion &rgn)
{
+#ifdef Q_SYMBIAN_SUPPORTS_SURFACES
+ S60->wsSession().Finish();
+#endif
+
if (!qt_widget_private(window())->isOpaque) {
QS60PixmapData *pixmapData = static_cast<QS60PixmapData *>(d_ptr->device.data_ptr().data());
pixmapData->beginDataAccess();