diff options
author | Sérgio Martins <sergio.martins@kdab.com> | 2015-06-26 20:40:50 +0100 |
---|---|---|
committer | Milian Wolff <milian.wolff@kdab.com> | 2015-08-25 11:12:19 +0000 |
commit | df276787d5bb191da62db632efaeb4256fa5da27 (patch) | |
tree | 5b49d4c3c465644ac9e4afbe2f76bdd2a3b231da /src/gui/painting | |
parent | ffbc2d3dc06017959167feecd60b66891c3b2c7b (diff) |
QRasterPaintEngine: Don't detach QImage
Caught being detached a few thousand times per second.
Change-Id: I6dd5fd69d7d4f32048cdb7e4ac707f24df6c15f8
(cherry picked from commit 2a81516835c680c29f3de9241a8c28027624ce4f)
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qpaintengine_raster.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index aabf4a9427..a5957ca86e 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -2756,12 +2756,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()); |