summaryrefslogtreecommitdiffstats
path: root/src/plugins/gfxdrivers
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-10-25 10:54:16 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-10-25 10:54:16 (GMT)
commitcb50699b39e016a64a2a06088042622546c428a2 (patch)
tree77d269a3103a6c140098b9caaafd17a29a81addd /src/plugins/gfxdrivers
parent89807f70656b95c1568ef183dd7f28c527fc3eaa (diff)
parent890c1110ec5e39bb6e63e99fe09c296c1ea824be (diff)
downloadQt-cb50699b39e016a64a2a06088042622546c428a2.zip
Qt-cb50699b39e016a64a2a06088042622546c428a2.tar.gz
Qt-cb50699b39e016a64a2a06088042622546c428a2.tar.bz2
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts: demos/declarative/snake/snake.qml qmake/generators/symbian/symbiancommon.cpp src/network/access/qnetworkaccessmanager.cpp src/s60installs/s60installs.pro tests/auto/qitemselectionmodel/tst_qitemselectionmodel.cpp tests/auto/qnetworkreply/tst_qnetworkreply.cpp
Diffstat (limited to 'src/plugins/gfxdrivers')
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
index c0d96d7..ce3a05a 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
@@ -251,12 +251,6 @@ bool QDirectFBPixmapData::fromDataBufferDescription(const DFBDataBufferDescripti
}
QDirectFBPointer<IDirectFBImageProvider> provider(providerPtr);
- DFBSurfaceDescription surfaceDescription;
- if ((result = provider->GetSurfaceDescription(provider.data(), &surfaceDescription)) != DFB_OK) {
- DirectFBError("QDirectFBPixmapData::fromDataBufferDescription(): Can't get surface description", result);
- return false;
- }
-
DFBImageDescription imageDescription;
result = provider->GetImageDescription(provider.data(), &imageDescription);
if (result != DFB_OK) {
@@ -264,7 +258,17 @@ bool QDirectFBPixmapData::fromDataBufferDescription(const DFBDataBufferDescripti
return false;
}
- alpha = imageDescription.caps & (DICAPS_ALPHACHANNEL|DICAPS_COLORKEY);
+ if (imageDescription.caps & DICAPS_COLORKEY) {
+ return false;
+ }
+
+ DFBSurfaceDescription surfaceDescription;
+ if ((result = provider->GetSurfaceDescription(provider.data(), &surfaceDescription)) != DFB_OK) {
+ DirectFBError("QDirectFBPixmapData::fromDataBufferDescription(): Can't get surface description", result);
+ return false;
+ }
+
+ alpha = imageDescription.caps & DICAPS_ALPHACHANNEL;
imageFormat = alpha ? screen->alphaPixmapFormat() : screen->pixelFormat();
dfbSurface = screen->createDFBSurface(QSize(surfaceDescription.width, surfaceDescription.height),