summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
index ee60302..9df3051 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
@@ -109,7 +109,8 @@ void QDirectFBPixmapData::copy(const QPixmapData *data, const QRect &rect)
}
IDirectFBSurface *src = static_cast<const QDirectFBPixmapData*>(data)->directFBSurface();
- const QImage::Format format = (data->hasAlphaChannel()
+ const bool hasAlpha = data->hasAlphaChannel();
+ const QImage::Format format = (hasAlpha
? QDirectFBScreen::instance()->alphaPixmapFormat()
: QDirectFBScreen::instance()->pixelFormat());
@@ -122,7 +123,12 @@ void QDirectFBPixmapData::copy(const QPixmapData *data, const QRect &rect)
}
forceRaster = (format == QImage::Format_RGB32);
- dfbSurface->SetBlittingFlags(dfbSurface, DSBLIT_NOFX);
+ if (hasAlpha) {
+ dfbSurface->Clear(dfbSurface, 0, 0, 0, 0);
+ dfbSurface->SetBlittingFlags(dfbSurface, DSBLIT_BLEND_ALPHACHANNEL);
+ } else {
+ dfbSurface->SetBlittingFlags(dfbSurface, DSBLIT_NOFX);
+ }
const DFBRectangle blitRect = { rect.x(), rect.y(),
rect.width(), rect.height() };
DFBResult result = dfbSurface->Blit(dfbSurface, src, &blitRect, 0, 0);