diff options
author | Jiang Jiang <jiang.jiang@nokia.com> | 2012-02-28 12:50:27 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-08 09:39:26 +0100 |
commit | 7de046db735ffc1e17d11dca1bb815876e796cdc (patch) | |
tree | eeff468b1456bbd4f0d9608b388b3ad746041dc4 /src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | |
parent | a44da8fc12bdd1fc62311307b7cae391858a206e (diff) |
Enablers for shared graphics cache in raster paint engine
Required changes for using shared graphics cache for distance field
raster glyph rendering. Most of the logic is in platform plugins.
Platform plugins should implement
QPlatformIntegration::createImagePaintEngine() to create a subclass
of QRasterEngine.
Change-Id: Icf0a396e722e43b4caa2c1849aae38753cde38f1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Diffstat (limited to 'src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp')
-rw-r--r-- | src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index 29dab0e1e0..ca32adcd6f 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -1432,8 +1432,7 @@ void QGL2PaintEngineEx::drawStaticTextItem(QStaticTextItem *textItem) // don't try to cache huge fonts or vastly transformed fonts QFontEngine *fontEngine = textItem->fontEngine(); - const qreal pixelSize = fontEngine->fontDef.pixelSize; - if (shouldDrawCachedGlyphs(pixelSize, s->matrix) || det < 0.25f || det > 4.f) { + if (shouldDrawCachedGlyphs(fontEngine, s->matrix) || det < 0.25f || det > 4.f) { QFontEngineGlyphCache::Type glyphType = fontEngine->glyphFormat >= 0 ? QFontEngineGlyphCache::Type(textItem->fontEngine()->glyphFormat) : d->glyphCacheType; @@ -1491,8 +1490,7 @@ void QGL2PaintEngineEx::drawTextItem(const QPointF &p, const QTextItem &textItem bool drawCached = txtype < QTransform::TxProject; // don't try to cache huge fonts or vastly transformed fonts - const qreal pixelSize = ti.fontEngine->fontDef.pixelSize; - if (shouldDrawCachedGlyphs(pixelSize, s->matrix) || det < 0.25f || det > 4.f) + if (shouldDrawCachedGlyphs(ti.fontEngine, s->matrix) || det < 0.25f || det > 4.f) drawCached = false; QFontEngineGlyphCache::Type glyphType = ti.fontEngine->glyphFormat >= 0 |