diff options
author | Anders Bakken <anders.bakken@nokia.com> | 2009-11-04 22:46:29 (GMT) |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2009-11-06 10:24:08 (GMT) |
commit | 66e9e79e1c9e983df2cd870a01bf65b3374406b9 (patch) | |
tree | 710909487e290e6a3c43f327586b591e421a00ea | |
parent | faa534e55b9a03dabc44565e45f2f19297edf29d (diff) | |
download | Qt-66e9e79e1c9e983df2cd870a01bf65b3374406b9.zip Qt-66e9e79e1c9e983df2cd870a01bf65b3374406b9.tar.gz Qt-66e9e79e1c9e983df2cd870a01bf65b3374406b9.tar.bz2 |
Reset composition mode after drawing in dfb
When drawing primitives in DirectFB we always set composition mode to
NONE and manually manage whether or not to blend. This patch makes sure
we will reset the composition mode afterwards.
Reviewed-by: Donald Carr <donald.carr@nokia.com>
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp index dd6b0d3..690b387 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp @@ -68,9 +68,10 @@ public: }; enum CompositionModeStatus { - PorterDuff_None = 0x0, - PorterDuff_SupportedBlits = 0x1, - PorterDuff_SupportedPrimitives = 0x2 + PorterDuff_None = 0x00, + PorterDuff_SupportedBlits = 0x01, + PorterDuff_SupportedPrimitives = 0x02, + PorterDuff_Dirty = 0x10 }; enum ClipType { @@ -945,6 +946,9 @@ void QDirectFBPaintEnginePrivate::prepareForBlit(bool alpha) } surface->SetColor(surface, 0xff, 0xff, 0xff, opacity); surface->SetBlittingFlags(surface, blittingFlags); + if (compositionModeStatus & PorterDuff_Dirty) { + setCompositionMode(q->state()->composition_mode); + } } static inline uint ALPHA_MUL(uint x, uint a) @@ -962,6 +966,7 @@ void QDirectFBPaintEnginePrivate::setDFBColor(const QColor &color) surface->SetColor(surface, color.red(), color.green(), color.blue(), alpha); surface->SetPorterDuff(surface, DSPD_NONE); surface->SetDrawingFlags(surface, alpha == 255 ? DSDRAW_NOFX : DSDRAW_BLEND); + compositionModeStatus |= PorterDuff_Dirty; } IDirectFBSurface *QDirectFBPaintEnginePrivate::getSurface(const QImage &img, bool *release) |