QRasterPaintEngine: Don't detach QImage
Caught being detached a few thousand times per second.
Change-Id: I6dd5fd69d7d4f32048cdb7e4ac707f24df6c15f8
(cherry picked from commit 2a81516835)
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
bb10
parent
ffbc2d3dc0
commit
df276787d5
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Reference in New Issue