diff options
author | João Abecasis <joao.abecasis@nokia.com> | 2011-02-16 11:54:13 (GMT) |
---|---|---|
committer | João Abecasis <joao.abecasis@nokia.com> | 2011-02-16 11:54:13 (GMT) |
commit | 0df215e5afc780c1fddd9e410f7ef0814ac1307c (patch) | |
tree | 6ac4abf3fcc9c41093b760f4f113221811e2e2ad /src/gui/painting/qwindowsurface_s60.cpp | |
parent | 3f3a0f31b74774051021d969e008d7bd1536b010 (diff) | |
parent | 0a24d2d6269d509e775f7da91c8002eddc2dcbd7 (diff) | |
download | Qt-0df215e5afc780c1fddd9e410f7ef0814ac1307c.zip Qt-0df215e5afc780c1fddd9e410f7ef0814ac1307c.tar.gz Qt-0df215e5afc780c1fddd9e410f7ef0814ac1307c.tar.bz2 |
Merge remote branch 'qt/master' into earth-team-staging
Conflicts:
src/s60installs/bwins/QtGuiu.def
Diffstat (limited to 'src/gui/painting/qwindowsurface_s60.cpp')
-rw-r--r-- | src/gui/painting/qwindowsurface_s60.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/gui/painting/qwindowsurface_s60.cpp b/src/gui/painting/qwindowsurface_s60.cpp index a860818..71556d7 100644 --- a/src/gui/painting/qwindowsurface_s60.cpp +++ b/src/gui/painting/qwindowsurface_s60.cpp @@ -61,13 +61,11 @@ struct QS60WindowSurfacePrivate QList<QImage*> bufferImages; }; -QS60WindowSurface::QS60WindowSurface(QWidget* widget) - : QWindowSurface(widget), d_ptr(new QS60WindowSurfacePrivate) +TDisplayMode displayMode(bool opaque) { TDisplayMode mode = S60->screenDevice()->DisplayMode(); - bool isOpaque = qt_widget_private(widget)->isOpaque; - if (isOpaque) { + if (opaque) { mode = EColor16MU; } else { if (QSysInfo::symbianVersion() >= QSysInfo::SV_SF_3) @@ -75,7 +73,13 @@ QS60WindowSurface::QS60WindowSurface(QWidget* widget) else mode = EColor16MA; // Symbian prior to Symbian^3 sw accelerates EColor16MA } + return mode; +} +QS60WindowSurface::QS60WindowSurface(QWidget* widget) + : QWindowSurface(widget), d_ptr(new QS60WindowSurfacePrivate) +{ + TDisplayMode mode = displayMode(qt_widget_private(widget)->isOpaque); // We create empty CFbsBitmap here -> it will be resized in setGeometry CFbsBitmap *bitmap = new CFbsBitmap; // CBase derived object needs check on new Q_CHECK_PTR(bitmap); @@ -122,6 +126,11 @@ void QS60WindowSurface::beginPaint(const QRegion &rgn) if (!qt_widget_private(window())->isOpaque) { QS60PixmapData *pixmapData = static_cast<QS60PixmapData *>(d_ptr->device.data_ptr().data()); + + TDisplayMode mode = displayMode(false); + if (pixmapData->cfbsBitmap->DisplayMode() != mode) + pixmapData->convertToDisplayMode(mode); + pixmapData->beginDataAccess(); QPainter p(&pixmapData->image); |