summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorAnders Bakken <anders.bakken@nokia.com>2009-04-08 19:24:58 (GMT)
committerAnders Bakken <anders.bakken@nokia.com>2009-04-08 19:24:58 (GMT)
commit91081c68b7899c95a998b03ee581927d62bd6880 (patch)
treebea8e11a5a2e9b7a7dbb2ec16f09f6f0e582a1e0 /src/plugins
parentb273cd322345c54d5cbd6f178791d1ccfcc08e05 (diff)
downloadQt-91081c68b7899c95a998b03ee581927d62bd6880.zip
Qt-91081c68b7899c95a998b03ee581927d62bd6880.tar.gz
Qt-91081c68b7899c95a998b03ee581927d62bd6880.tar.bz2
Don't convert unsupported images for dfb
Fall back to raster engine for formats not supported by dfb rather than converting the image to a supported format. Reviewed-by: Donald <qt-info@nokia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
index a93bbf7..452ee48 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
@@ -694,16 +694,10 @@ void QDirectFBPaintEnginePrivate::drawTiledPixmap(const QRectF &dest,
}
void QDirectFBPaintEnginePrivate::drawImage(const QRectF &dest,
- const QImage &srcImage,
+ const QImage &image,
const QRectF &src)
{
- QImage image = srcImage;
- if (QDirectFBScreen::getSurfacePixelFormat(image.format()) == DSPF_UNKNOWN) {
- image = image.convertToFormat(image.hasAlphaChannel()
- ? QDirectFBScreen::instance()->alphaPixmapFormat()
- : QDirectFBScreen::instance()->pixelFormat());
- }
-
+ Q_ASSERT(QDirectFBScreen::getSurfacePixelFormat(image.format()) != DSPF_UNKNOWN);
CachedImage *img = imageCache[image.cacheKey()];
IDirectFBSurface *imgSurface = 0;
bool doRelease = false;
@@ -1017,7 +1011,8 @@ void QDirectFBPaintEngine::drawImage(const QRectF &r, const QImage &image,
#ifndef QT_NO_DIRECTFB_PREALLOCATED
d->updateClip();
- if (!d->dfbCanHandleClip(r) || d->matrixRotShear)
+ if (!d->dfbCanHandleClip(r) || d->matrixRotShear
+ || QDirectFBScreen::getSurfacePixelFormat(image.format()) == DSPF_UNKNOWN)
#endif
{
d->lock();