summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2014-05-27 12:25:08 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-05-28 00:14:55 +0200
commit5fbc1f39ae82e8d2f452a8040723d6cfcb88f0c6 (patch)
treeac1ffa0f052495e9e37cfb93cde204ec85973c0a /src
parent34590e84d4aaceb5874d8acb6a2b7a95c153cd6a (diff)
Fix fast painting of clipped text on non RGB32 formats
QRasterPaintEngine::alphaPenBlt makes the assumption that a device with bit depth 32 has optimized alphamapBlit and alphaRGBBlit routines. This will fail on RGBA8888 format resulting in some text not being rendered. Change-Id: Ia7d88bb0e3094894affceda1acc42396b67b3677 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'src')
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index ce8c1d1ca7..a004428fab 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -2603,7 +2603,7 @@ void QRasterPaintEngine::alphaPenBlt(const void* src, int bpl, int depth, int rx
return;
}
}
- } else if (d->deviceDepth == 32 && (depth == 8 || depth == 32)) {
+ } else if (d->deviceDepth == 32 && ((depth == 8 && s->penData.alphamapBlit) || (depth == 32 && s->penData.alphaRGBBlit))) {
// (A)RGB Alpha mask where the alpha component is not used.
if (!clip) {
int nx = qMax(0, rx);
@@ -2626,13 +2626,12 @@ void QRasterPaintEngine::alphaPenBlt(const void* src, int bpl, int depth, int rx
rx = nx;
ry = ny;
}
- if (depth == 8 && s->penData.alphamapBlit) {
+ if (depth == 8)
s->penData.alphamapBlit(rb, rx, ry, s->penData.solid.color,
scanline, w, h, bpl, clip);
- } else if (depth == 32 && s->penData.alphaRGBBlit) {
+ else if (depth == 32)
s->penData.alphaRGBBlit(rb, rx, ry, s->penData.solid.color,
(const uint *) scanline, w, h, bpl / 4, clip);
- }
return;
}
}