summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAnders Bakken <anders.bakken@nokia.com>2009-06-04 16:07:38 (GMT)
committerAnders Bakken <anders.bakken@nokia.com>2009-06-04 16:07:38 (GMT)
commitf7338759ef86deba18b27ee72b3afcf40f3a5aaf (patch)
treec7409de49a47fc610460f7f6c6330096b8e0bc69 /src
parent398c022e8adefc6e71a6048da40c19f6169be831 (diff)
downloadQt-f7338759ef86deba18b27ee72b3afcf40f3a5aaf.zip
Qt-f7338759ef86deba18b27ee72b3afcf40f3a5aaf.tar.gz
Qt-f7338759ef86deba18b27ee72b3afcf40f3a5aaf.tar.bz2
Make sure to retain alpha information in copy
We need to set alpha to the right value when copying pixmaps. Reviewed-by: Donald <qt-info@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
index dba1b51..18754f5 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
@@ -202,11 +202,12 @@ void QDirectFBPixmapData::copy(const QPixmapData *data, const QRect &rect)
}
IDirectFBSurface *src = static_cast<const QDirectFBPixmapData*>(data)->directFBSurface();
- const bool hasAlpha = data->hasAlphaChannel();
- format = (hasAlpha
+ alpha = data->hasAlphaChannel();
+ format = (alpha
? QDirectFBScreen::instance()->alphaPixmapFormat()
: QDirectFBScreen::instance()->pixelFormat());
+
dfbSurface = screen->createDFBSurface(rect.size(), format,
QDirectFBScreen::TrackSurface);
if (!dfbSurface) {
@@ -215,7 +216,7 @@ void QDirectFBPixmapData::copy(const QPixmapData *data, const QRect &rect)
return;
}
- if (hasAlpha) {
+ if (alpha) {
dfbSurface->Clear(dfbSurface, 0, 0, 0, 0);
dfbSurface->SetBlittingFlags(dfbSurface, DSBLIT_BLEND_ALPHACHANNEL);
} else {