summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
index 24d77bf..a8fdff8 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
@@ -440,10 +440,9 @@ void QDirectFBPaintEnginePrivate::setOpacity(quint8 op)
{
opacity = op;
if (opacity == 255) {
- // ### need to check this stuff
- blitFlagsFromCompositionMode &= ~(DSBLIT_BLEND_COLORALPHA | DSBLIT_SRC_PREMULTCOLOR);
+ blitFlagsFromCompositionMode &= ~DSBLIT_BLEND_COLORALPHA;
} else {
- blitFlagsFromCompositionMode |= (DSBLIT_BLEND_COLORALPHA | DSBLIT_SRC_PREMULTCOLOR);
+ blitFlagsFromCompositionMode |= DSBLIT_BLEND_COLORALPHA;
}
}
@@ -459,11 +458,14 @@ void QDirectFBPaintEnginePrivate::setRenderHints(QPainter::RenderHints hints)
void QDirectFBPaintEnginePrivate::prepareForBlit(bool alpha)
{
quint32 blittingFlags = blitFlagsFromCompositionMode;
- if (!alpha) {
+ if (alpha) {
+ surface->SetPorterDuff(surface,
+ (blittingFlags & DSBLIT_BLEND_COLORALPHA)
+ ? DSPD_NONE
+ : porterDuffRule);
+ } else {
blittingFlags &= ~DSBLIT_BLEND_ALPHACHANNEL;
surface->SetPorterDuff(surface, DSPD_NONE);
- } else {
- surface->SetPorterDuff(surface, porterDuffRule);
}
surface->SetColor(surface, 0xff, 0xff, 0xff, opacity);
surface->SetBlittingFlags(surface, DFBSurfaceBlittingFlags(blittingFlags));