From cf56e066ada1029aa7e25bca99843a6b1fbc8f09 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 17 Mar 2014 11:57:16 +0100 Subject: [PATCH] Revert "Make OpenGL texture glyph cache use the right freetype glyphs" This reverts commit f78661b03cc1affcdd222be50b35d956edac4711. The reverted patch was working around that QFontEngineFT was using the poor QFontEngine fall back. That issue was fixed in commit 0b7beaaaf2384fae01ae403737450a59b2fcabac, and the work around is no longer needed. This also fixes a rare problem with the workaround when the fontengine and the glyph-cache do not share the same default glyph format which can happen with QRawFonts. Change-Id: I150f70a003b137c1d145f6f70cda568c85633e5c Reviewed-by: Gunnar Sletta --- src/gui/opengl/qopengltextureglyphcache.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/gui/opengl/qopengltextureglyphcache.cpp b/src/gui/opengl/qopengltextureglyphcache.cpp index 5844bf639c..3287bbb972 100644 --- a/src/gui/opengl/qopengltextureglyphcache.cpp +++ b/src/gui/opengl/qopengltextureglyphcache.cpp @@ -350,17 +350,7 @@ void QOpenGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph, QFixed return; } - QImage mask; - - if (m_current_fontengine->hasInternalCaching()) { - QImage *alphaMap = m_current_fontengine->lockedAlphaMapForGlyph(glyph, subPixelPosition, QFontEngine::Format_None); - if (!alphaMap || alphaMap->isNull()) - return; - mask = alphaMap->copy(); - m_current_fontengine->unlockAlphaMapForGlyph(); - } else { - mask = textureMapForGlyph(glyph, subPixelPosition); - } + QImage mask = textureMapForGlyph(glyph, subPixelPosition); const int maskWidth = mask.width(); const int maskHeight = mask.height();