From 202a3deec74a6e730824b1a95b7f9fa2e1909a0a Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Fri, 6 Mar 2015 00:36:15 +0400 Subject: [QFontEngineFT] Get rid of redundant lockFace()/unlockFace() calls loadGlyphFor() locks the face when needed. Change-Id: Ia02dce08243499f9f11b345dcdfa5d9e0a3bc889 Reviewed-by: Lars Knoll --- src/gui/text/qfontengine_ft.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src/gui/text/qfontengine_ft.cpp') diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp index 5cc837d192..8176ede994 100644 --- a/src/gui/text/qfontengine_ft.cpp +++ b/src/gui/text/qfontengine_ft.cpp @@ -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; } -- cgit v1.2.3