QRasterPaintEngine: Don't detach QImage
Caught being detached a few thousand times per second. Change-Id: I9f3c80cc5178ec2016041a4f2f6e6e1f458171f1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
This commit is contained in:
parent
aa09cc029f
commit
2a81516835
@ -2752,12 +2752,12 @@ bool QRasterPaintEngine::drawCachedGlyphs(int numGlyphs, const glyph_t *glyphs,
|
|||||||
QFixed spp = fontEngine->subPixelPositionForX(positions[i].x);
|
QFixed spp = fontEngine->subPixelPositionForX(positions[i].x);
|
||||||
|
|
||||||
QPoint offset;
|
QPoint offset;
|
||||||
QImage *alphaMap = fontEngine->lockedAlphaMapForGlyph(glyphs[i], spp, neededFormat, s->matrix,
|
const QImage *alphaMap = fontEngine->lockedAlphaMapForGlyph(glyphs[i], spp, neededFormat, s->matrix,
|
||||||
&offset);
|
&offset);
|
||||||
if (alphaMap == 0 || alphaMap->isNull())
|
if (alphaMap == 0 || alphaMap->isNull())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
alphaPenBlt(alphaMap->bits(), alphaMap->bytesPerLine(), alphaMap->depth(),
|
alphaPenBlt(alphaMap->constBits(), alphaMap->bytesPerLine(), alphaMap->depth(),
|
||||||
qFloor(positions[i].x) + offset.x(),
|
qFloor(positions[i].x) + offset.x(),
|
||||||
qRound(positions[i].y) + offset.y(),
|
qRound(positions[i].y) + offset.y(),
|
||||||
alphaMap->width(), alphaMap->height());
|
alphaMap->width(), alphaMap->height());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user