diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2010-11-08 16:33:49 (GMT) |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2010-11-08 16:51:34 (GMT) |
commit | 285855b8fbbdc7ad428a0c66f6c4469d97e55769 (patch) | |
tree | 41237f2f7b53bea0b3484a9907182240600366b3 /src | |
parent | ee958e086847e2131f9b746e5c6de4491ae1f44b (diff) | |
download | Qt-285855b8fbbdc7ad428a0c66f6c4469d97e55769.zip Qt-285855b8fbbdc7ad428a0c66f6c4469d97e55769.tar.gz Qt-285855b8fbbdc7ad428a0c66f6c4469d97e55769.tar.bz2 |
Fixed text rendering bug in raster engine when opacity != 1.0.
If opacity is updated independently from the pen properties sometimes
the raster engine's fast_text flag would not be updated correctly,
causing it to use a rendering path which doesn't support alpha.
Reviewed-by: Robin Burchell
Reviewed-by: Andreas Kling
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/painting/qpaintengine_raster.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index 161ced5..89202ac 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -875,9 +875,10 @@ void QRasterPaintEngine::updateState() if (s->dirty & DirtyTransform) updateMatrix(s->matrix); - if (s->dirty & (DirtyPen|DirtyCompositionMode)) { + if (s->dirty & (DirtyPen|DirtyCompositionMode|DirtyOpacity)) { const QPainter::CompositionMode mode = s->composition_mode; s->flags.fast_text = (s->penData.type == QSpanData::Solid) + && s->intOpacity == 256 && (mode == QPainter::CompositionMode_Source || (mode == QPainter::CompositionMode_SourceOver && qAlpha(s->penData.solid.color) == 255)); @@ -901,6 +902,7 @@ void QRasterPaintEngine::opacityChanged() s->fillFlags |= DirtyOpacity; s->strokeFlags |= DirtyOpacity; s->pixmapFlags |= DirtyOpacity; + s->dirty |= DirtyOpacity; s->intOpacity = (int) (s->opacity * 256); } |