summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpaintengineex.cpp
diff options
context:
space:
mode:
authorJiang Jiang <jiang.jiang@nokia.com>2012-02-28 12:50:27 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-08 09:39:26 +0100
commit7de046db735ffc1e17d11dca1bb815876e796cdc (patch)
treeeeff468b1456bbd4f0d9608b388b3ad746041dc4 /src/gui/painting/qpaintengineex.cpp
parenta44da8fc12bdd1fc62311307b7cae391858a206e (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/gui/painting/qpaintengineex.cpp')
-rw-r--r--src/gui/painting/qpaintengineex.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp
index 93f36ba0ab..36414f4774 100644
--- a/src/gui/painting/qpaintengineex.cpp
+++ b/src/gui/painting/qpaintengineex.cpp
@@ -1081,9 +1081,9 @@ void QPaintEngineEx::drawStaticTextItem(QStaticTextItem *staticTextItem)
}
}
-bool QPaintEngineEx::supportsTransformations(qreal pixelSize, const QTransform &m) const
+bool QPaintEngineEx::supportsTransformations(QFontEngine *fontEngine, const QTransform &m) const
{
- Q_UNUSED(pixelSize);
+ Q_UNUSED(fontEngine);
if (!m.isAffine())
return true;
@@ -1091,8 +1091,9 @@ bool QPaintEngineEx::supportsTransformations(qreal pixelSize, const QTransform &
return false;
}
-bool QPaintEngineEx::shouldDrawCachedGlyphs(qreal pixelSize, const QTransform &m) const
+bool QPaintEngineEx::shouldDrawCachedGlyphs(QFontEngine *fontEngine, const QTransform &m) const
{
+ qreal pixelSize = fontEngine->fontDef.pixelSize;
return (pixelSize * pixelSize * qAbs(m.determinant())) <
QT_MAX_CACHED_GLYPH_SIZE * QT_MAX_CACHED_GLYPH_SIZE;
}