summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorAnders Bakken <agbakken@gmail.com>2010-10-08 17:21:25 (GMT)
committerDonald Carr <donald.carr@nokia.com>2010-10-21 19:53:16 (GMT)
commit91340390f4968241a804c259c4a468f0a526436d (patch)
tree28efbf4260fed9b97e8e4cb5739a9789567b2fb3 /src/plugins
parentd59027e27767fde354113da26fce3f3ba279bb68 (diff)
downloadQt-91340390f4968241a804c259c4a468f0a526436d.zip
Qt-91340390f4968241a804c259c4a468f0a526436d.tar.gz
Qt-91340390f4968241a804c259c4a468f0a526436d.tar.bz2
Fall back to Qt for loading images with DICAPS_COLORKEY.
Merge-request: 844 Reviewed-by: Donald Carr <donald.carr@nokia.com>
Diffstat (limited to 'src/plugins')
-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),