summaryrefslogtreecommitdiffstats
path: root/src/gui/image
diff options
context:
space:
mode:
authorFabien Freling <fabien.freling@nokia.com>2010-10-08 16:37:25 (GMT)
committerFabien Freling <fabien.freling@nokia.com>2010-10-08 16:37:59 (GMT)
commit1966b88611bb45d18d586847eeb3597d6e022eb7 (patch)
tree0bba3169a8bc44761686fd967f1cb25e4beca97a /src/gui/image
parent392ecc76cdbcef37ee492400a1b783106a37ad36 (diff)
downloadQt-1966b88611bb45d18d586847eeb3597d6e022eb7.zip
Qt-1966b88611bb45d18d586847eeb3597d6e022eb7.tar.gz
Qt-1966b88611bb45d18d586847eeb3597d6e022eb7.tar.bz2
Experimental support of the unified toolbar with
the raster engine on Mac OS X. Task-number: QTBUG-12615 Reviewed-by: Samuel Rødal
Diffstat (limited to 'src/gui/image')
-rw-r--r--src/gui/image/qnativeimage.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/gui/image/qnativeimage.cpp b/src/gui/image/qnativeimage.cpp
index 8446387..5978a1b 100644
--- a/src/gui/image/qnativeimage.cpp
+++ b/src/gui/image/qnativeimage.cpp
@@ -241,8 +241,19 @@ QNativeImage::QNativeImage(int width, int height, QImage::Format format, bool /*
: image(width, height, format)
{
-
uint cgflags = kCGImageAlphaNoneSkipFirst;
+ switch (format) {
+ case QImage::Format_ARGB32:
+ cgflags = kCGImageAlphaFirst;
+ break;
+ case QImage::Format_ARGB32_Premultiplied:
+ case QImage::Format_ARGB8565_Premultiplied:
+ case QImage::Format_ARGB6666_Premultiplied:
+ case QImage::Format_ARGB8555_Premultiplied:
+ case QImage::Format_ARGB4444_Premultiplied:
+ cgflags = kCGImageAlphaPremultipliedFirst;
+ break;
+ }
#ifdef kCGBitmapByteOrder32Host //only needed because CGImage.h added symbols in the minor version
cgflags |= kCGBitmapByteOrder32Host;