summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSérgio Martins <[email protected]>2015-06-26 20:40:50 +0100
committerSérgio Martins <[email protected]>2015-06-29 10:34:39 +0000
commit2a81516835c680c29f3de9241a8c28027624ce4f (patch)
treea9b8400ad703e37c95502cef56cfd5af0f2d2967
parentaa09cc029fa3a46b0c2004680d3eb20983840456 (diff)
QRasterPaintEngine: Don't detach QImage
Caught being detached a few thousand times per second. Change-Id: I9f3c80cc5178ec2016041a4f2f6e6e1f458171f1 Reviewed-by: Allan Sandfeld Jensen <[email protected]> Reviewed-by: Giuseppe D'Angelo <[email protected]> Reviewed-by: Marc Mutz <[email protected]> Reviewed-by: Konstantin Ritt <[email protected]>
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 882a088d5c5..f55dddfb6ad 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -2752,12 +2752,12 @@ bool QRasterPaintEngine::drawCachedGlyphs(int numGlyphs, const glyph_t *glyphs,
QFixed spp = fontEngine->subPixelPositionForX(positions[i].x);
QPoint offset;
- QImage *alphaMap = fontEngine->lockedAlphaMapForGlyph(glyphs[i], spp, neededFormat, s->matrix,
- &offset);
+ const QImage *alphaMap = fontEngine->lockedAlphaMapForGlyph(glyphs[i], spp, neededFormat, s->matrix,
+ &offset);
if (alphaMap == 0 || alphaMap->isNull())
continue;
- alphaPenBlt(alphaMap->bits(), alphaMap->bytesPerLine(), alphaMap->depth(),
+ alphaPenBlt(alphaMap->constBits(), alphaMap->bytesPerLine(), alphaMap->depth(),
qFloor(positions[i].x) + offset.x(),
qRound(positions[i].y) + offset.y(),
alphaMap->width(), alphaMap->height());