From 5dcc69927538bc195236fd7c4287976c819aa8df Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Mon, 25 Jul 2011 10:39:23 +0200 Subject: Get subpixel antialiasing again w/combo of raster and affine transform Revert part of hot fix 48ff7e5af99923396243940979d15d4ec2e2730c since it is no longer needed in Qt 4.8 due to the introduction of a separate code path for the FreeType case in drawCachedGlyphs(). This is also explained in the description for that commit. The consequence of the commit was that subpixel antialiasing would be turned off for all text drawn with a transformation and the raster engine. In the past this was not the case, it is however the case in several other paint engine, so the regression was deemed okay to hot fix the original problem. In Qt 4.8 the original problem has been fixed properly. Task-number: QTBUG-16205 Reviewed-by: Jiang Jiang --- src/gui/painting/qpaintengine_raster.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index 9ba4592..626100a 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -2862,15 +2862,9 @@ bool QRasterPaintEngine::drawCachedGlyphs(int numGlyphs, const glyph_t *glyphs, } else #endif { - QFontEngineGlyphCache::Type glyphType; - if (fontEngine->glyphFormat >= 0) { - glyphType = QFontEngineGlyphCache::Type(fontEngine->glyphFormat); - } else if (s->matrix.type() > QTransform::TxTranslate - && d->glyphCacheType == QFontEngineGlyphCache::Raster_RGBMask) { - glyphType = QFontEngineGlyphCache::Raster_A8; - } else { - glyphType = d->glyphCacheType; - } + QFontEngineGlyphCache::Type glyphType = fontEngine->glyphFormat >= 0 + ? QFontEngineGlyphCache::Type(fontEngine->glyphFormat) + : d->glyphCacheType; QImageTextureGlyphCache *cache = static_cast(fontEngine->glyphCache(0, glyphType, s->matrix)); -- cgit v0.12