summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAnders Bakken <agbakken@gmail.com>2010-09-16 23:58:56 (GMT)
committerDonald Carr <donald.carr@nokia.com>2010-09-16 23:58:56 (GMT)
commit6acbf6dce98903310023284e27a65c19f9a829bc (patch)
tree1d74739bdbf1c9b2108de78782b64e6bff761982 /src
parentfc007d0a99cc52e673c5d2606e5076831f6103b1 (diff)
downloadQt-6acbf6dce98903310023284e27a65c19f9a829bc.zip
Qt-6acbf6dce98903310023284e27a65c19f9a829bc.tar.gz
Qt-6acbf6dce98903310023284e27a65c19f9a829bc.tar.bz2
Make SourceOver work properly in Qt/DirectFB
Qt and DirectFB have different definitions of SourceOver. In DirectFB it's defined as this: /* pixel = (source * fs + destination * fd), sa = source alpha, da = destination alpha */ DSPD_SRC_OVER = 3, /* fs: 1.0 fd: 1.0-sa */ In other words, the source pixels are not multiplied by the alpha and this leads to issues with RGBA values like 255, 0, 0, 0. The composition mode that in DirectFB that maps onto Qt's CompositionMode_SourceOver is DSPD_NONE, defined like this: DSPD_NONE = 0, /* fs: sa fd: 1.0-sa (defaults) */ Merge-request: 807 Reviewed-by: Donald Carr <donald.carr@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
index d5f0d42..4869eba 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
@@ -978,7 +978,7 @@ void QDirectFBPaintEnginePrivate::setCompositionMode(QPainter::CompositionMode m
break;
case QPainter::CompositionMode_SourceOver:
compositionModeStatus &= ~PorterDuff_AlwaysBlend;
- surface->SetPorterDuff(surface, DSPD_SRC_OVER);
+ surface->SetPorterDuff(surface, DSPD_NONE);
break;
case QPainter::CompositionMode_DestinationOver:
surface->SetPorterDuff(surface, DSPD_DST_OVER);