diff options
author | Jiang Jiang <jiang.jiang@nokia.com> | 2011-07-25 10:52:48 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-07-25 11:50:16 +0200 |
commit | 8d762c9caea4f8b9ff589b6c23564f4e37242745 (patch) | |
tree | e77836db3e94ab2617eb6dd3d54574fa15d9a3a1 /src/gui/painting/qpaintengine_raster.cpp | |
parent | a150880ae6ea698a2e979c93498db4f3bb66c1b0 (diff) |
Making cached glyphs drawing check clearer
Putting the logic inside supportsTransformation() is a bit confusing and
that name is misleading.
Also move the same check in GL2 paint engine to the same place.
Change-Id: I182500a0ff375122e6be966b7ce2495c84d113d0
Reviewed-on: http://codereview.qt.nokia.com/2096
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Diffstat (limited to 'src/gui/painting/qpaintengine_raster.cpp')
-rw-r--r-- | src/gui/painting/qpaintengine_raster.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index e1802e6552..299f248d2b 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -3011,7 +3011,7 @@ void QRasterPaintEngine::drawStaticTextItem(QStaticTextItem *textItem) ensureState(); QFontEngine *fontEngine = textItem->fontEngine(); - if (!supportsTransformations(fontEngine)) { + if (shouldDrawCachedGlyphs(fontEngine->fontDef.pixelSize, state()->matrix)) { drawCachedGlyphs(textItem->numGlyphs, textItem->glyphs, textItem->glyphPositions, fontEngine); } else { @@ -3385,10 +3385,7 @@ bool QRasterPaintEngine::supportsTransformations(qreal pixelSize, const QTransfo #endif return true; - if (pixelSize * pixelSize * qAbs(m.determinant()) >= 64 * 64) - return true; - - return false; + return !shouldDrawCachedGlyphs(pixelSize, m); } /*! |