summaryrefslogtreecommitdiffstats
path: root/src/gui/image
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-11-12 14:20:06 (GMT)
committeraxis <qt-info@nokia.com>2009-11-12 14:20:06 (GMT)
commite0cd364f5b43c7b18214a605c7a5e1bb99c128a1 (patch)
tree698871276723227d8175d26e875d93a4cbd56eeb /src/gui/image
parent037c1c3b3e1abc07f0570336bd7958121f32848a (diff)
parent771672fa1a94a9b2b19e378d1b362dcdae323887 (diff)
downloadQt-e0cd364f5b43c7b18214a605c7a5e1bb99c128a1.zip
Qt-e0cd364f5b43c7b18214a605c7a5e1bb99c128a1.tar.gz
Qt-e0cd364f5b43c7b18214a605c7a5e1bb99c128a1.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-s60-public into 4.6-staging2
Diffstat (limited to 'src/gui/image')
-rw-r--r--src/gui/image/qpixmap_s60.cpp12
-rw-r--r--src/gui/image/qpixmap_s60_p.h2
2 files changed, 10 insertions, 4 deletions
diff --git a/src/gui/image/qpixmap_s60.cpp b/src/gui/image/qpixmap_s60.cpp
index f7a880c..21415d3 100644
--- a/src/gui/image/qpixmap_s60.cpp
+++ b/src/gui/image/qpixmap_s60.cpp
@@ -349,7 +349,8 @@ QS60PixmapData::QS60PixmapData(PixelType type) : QRasterPixmapData(type),
bitmapDevice(0),
bitmapGc(0),
pengine(0),
- bytes(0)
+ bytes(0),
+ formatLocked(false)
{
}
@@ -425,11 +426,12 @@ void QS60PixmapData::release()
}
/*!
- * Takes ownership of bitmap
+ * Takes ownership of bitmap. Used by window surface
*/
void QS60PixmapData::fromSymbianBitmap(CFbsBitmap* bitmap)
{
cfbsBitmap = bitmap;
+ formatLocked = true;
if(!initSymbianBitmapContext()) {
qWarning("Could not create CBitmapContext");
@@ -693,8 +695,10 @@ void QS60PixmapData::beginDataAccess()
bytes = newBytes;
TDisplayMode mode = cfbsBitmap->DisplayMode();
QImage::Format format = qt_TDisplayMode2Format(mode);
- //on S60 3.1, premultiplied alpha pixels are stored in a bitmap with 16MA type
- if (format == QImage::Format_ARGB32)
+ // On S60 3.1, premultiplied alpha pixels are stored in a bitmap with 16MA type.
+ // S60 window surface needs backing store pixmap for transparent window in ARGB32 format.
+ // In that case formatLocked is true.
+ if (!formatLocked && format == QImage::Format_ARGB32)
format = QImage::Format_ARGB32_Premultiplied; // pixel data is actually in premultiplied format
QVector<QRgb> savedColorTable;
diff --git a/src/gui/image/qpixmap_s60_p.h b/src/gui/image/qpixmap_s60_p.h
index b23961a..b1b5824 100644
--- a/src/gui/image/qpixmap_s60_p.h
+++ b/src/gui/image/qpixmap_s60_p.h
@@ -118,6 +118,8 @@ private:
QPaintEngine *pengine;
uchar* bytes;
+ bool formatLocked;
+
friend class QPixmap;
friend class QS60WindowSurface;
friend class QS60PaintEngine;