[QFontEngineFT] Get rid of redundant lockFace()/unlockFace() calls
loadGlyphFor() locks the face when needed. Change-Id: Ia02dce08243499f9f11b345dcdfa5d9e0a3bc889 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This commit is contained in:
parent
7cd1c0e420
commit
202a3deec7
@ -1864,13 +1864,10 @@ QImage QFontEngineFT::alphaMapForGlyph(glyph_t g, QFixed subPixelPosition)
|
||||
|
||||
QImage QFontEngineFT::alphaMapForGlyph(glyph_t g, QFixed subPixelPosition, const QTransform &t)
|
||||
{
|
||||
lockFace();
|
||||
|
||||
Glyph *glyph = loadGlyphFor(g, subPixelPosition, antialias ? Format_A8 : Format_Mono, t);
|
||||
if (!glyph || !glyph->data) {
|
||||
if (!cacheEnabled && glyph != &emptyGlyph)
|
||||
delete glyph;
|
||||
unlockFace();
|
||||
return QFontEngine::alphaMapForGlyph(g);
|
||||
}
|
||||
|
||||
@ -1891,7 +1888,6 @@ QImage QFontEngineFT::alphaMapForGlyph(glyph_t g, QFixed subPixelPosition, const
|
||||
|
||||
if (!cacheEnabled && glyph != &emptyGlyph)
|
||||
delete glyph;
|
||||
unlockFace();
|
||||
|
||||
return img;
|
||||
}
|
||||
@ -1901,13 +1897,10 @@ QImage QFontEngineFT::alphaRGBMapForGlyph(glyph_t g, QFixed subPixelPosition, co
|
||||
if (t.type() > QTransform::TxRotate)
|
||||
return QFontEngine::alphaRGBMapForGlyph(g, subPixelPosition, t);
|
||||
|
||||
lockFace();
|
||||
|
||||
Glyph *glyph = loadGlyphFor(g, subPixelPosition, Format_A32, t);
|
||||
if (!glyph || !glyph->data) {
|
||||
if (!cacheEnabled && glyph != &emptyGlyph)
|
||||
delete glyph;
|
||||
unlockFace();
|
||||
return QFontEngine::alphaRGBMapForGlyph(g, subPixelPosition, t);
|
||||
}
|
||||
|
||||
@ -1916,7 +1909,6 @@ QImage QFontEngineFT::alphaRGBMapForGlyph(glyph_t g, QFixed subPixelPosition, co
|
||||
|
||||
if (!cacheEnabled && glyph != &emptyGlyph)
|
||||
delete glyph;
|
||||
unlockFace();
|
||||
|
||||
return img;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user