diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2011-07-25 08:39:23 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2011-07-25 08:49:47 (GMT) |
commit | 5dcc69927538bc195236fd7c4287976c819aa8df (patch) | |
tree | 8fd414131a7056bc2982ae852e2556dae929c1ff /src/gui/painting | |
parent | a237c2cacec31e1aef00ff4e0b5707efc52d9b31 (diff) | |
download | Qt-5dcc69927538bc195236fd7c4287976c819aa8df.zip Qt-5dcc69927538bc195236fd7c4287976c819aa8df.tar.gz Qt-5dcc69927538bc195236fd7c4287976c819aa8df.tar.bz2 |
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
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qpaintengine_raster.cpp | 12 |
1 files 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<QImageTextureGlyphCache *>(fontEngine->glyphCache(0, glyphType, s->matrix)); |