diff options
author | Martin Jones <martin.jones@nokia.com> | 2011-04-27 05:22:20 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2011-04-27 05:22:20 (GMT) |
commit | dcf9a1f2f20248de0da9549af54bc3a4844eaf5b (patch) | |
tree | c9eee3ff39000816113bcab3a5c035da97c2a9fc /src/gui/egl/qegl_symbian.cpp | |
parent | 47712d1f330e4b22ce6dd30e7557288ef7f7fca0 (diff) | |
parent | 415951891cd75170f1e4b89b46effa3319b56e4e (diff) | |
download | Qt-dcf9a1f2f20248de0da9549af54bc3a4844eaf5b.zip Qt-dcf9a1f2f20248de0da9549af54bc3a4844eaf5b.tar.gz Qt-dcf9a1f2f20248de0da9549af54bc3a4844eaf5b.tar.bz2 |
Merge branch '4.7' of git://scm.dev.nokia.troll.no/qt/qt into 4.7
Diffstat (limited to 'src/gui/egl/qegl_symbian.cpp')
-rw-r--r-- | src/gui/egl/qegl_symbian.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gui/egl/qegl_symbian.cpp b/src/gui/egl/qegl_symbian.cpp index 6533d11..fabf9d1 100644 --- a/src/gui/egl/qegl_symbian.cpp +++ b/src/gui/egl/qegl_symbian.cpp @@ -42,6 +42,7 @@ #include <QtGui/qpaintdevice.h> #include <QtGui/qpixmap.h> #include <QtGui/qwidget.h> +#include <QtGui/private/qapplication_p.h> #include "qegl_p.h" #include "qeglcontext_p.h" @@ -73,10 +74,14 @@ void QEglProperties::setPaintDeviceFormat(QPaintDevice *dev) return; int devType = dev->devType(); - if (devType == QInternal::Image) + if (devType == QInternal::Image) { setPixelFormat(static_cast<QImage *>(dev)->format()); - else - setPixelFormat(QImage::Format_RGB32); + } else { + QImage::Format format = QImage::Format_RGB32; + if (QApplicationPrivate::instance() && QApplicationPrivate::instance()->useTranslucentEGLSurfaces) + format = QImage::Format_ARGB32_Premultiplied; + setPixelFormat(format); + } } |