summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-02-07 14:27:41 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-07 19:03:33 +0100
commit155a20628b91a7a2e24264feae12f4607574cb6b (patch)
treefb2a90af4b5410d6ec4b928a7424b512c16d4c45
parent73e93f43003cfa48aebbce408d13400bdd88514d (diff)
Use QPaintEngineEx to decide if font is too big for using the glyph cache
Instead of having separate logic in the OpenGL paint engine. Change-Id: I9854328f784864e52ba1bbaafe5e1c5dda976231 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
-rw-r--r--src/gui/opengl/qopenglpaintengine.cpp8
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp8
2 files changed, 4 insertions, 12 deletions
diff --git a/src/gui/opengl/qopenglpaintengine.cpp b/src/gui/opengl/qopenglpaintengine.cpp
index 68d9ad0a24..d248d2b8e5 100644
--- a/src/gui/opengl/qopenglpaintengine.cpp
+++ b/src/gui/opengl/qopenglpaintengine.cpp
@@ -1538,12 +1538,8 @@ namespace {
bool QOpenGL2PaintEngineEx::shouldDrawCachedGlyphs(QFontEngine *fontEngine, const QTransform &t) const
{
- float det = t.determinant();
-
- // Don't try to cache huge fonts or vastly transformed fonts
- return t.type() < QTransform::TxProject
- && QPaintEngineEx::shouldDrawCachedGlyphs(fontEngine, t)
- && det >= 0.25f && det <= 4.f;
+ // Don't try to cache vastly transformed fonts
+ return t.type() < QTransform::TxProject && QPaintEngineEx::shouldDrawCachedGlyphs(fontEngine, t);
}
void QOpenGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngineGlyphCache::Type glyphType,
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index b6da578f26..fff1834499 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -628,12 +628,8 @@ bool QGL2PaintEngineEx::isNativePaintingActive() const {
bool QGL2PaintEngineEx::shouldDrawCachedGlyphs(QFontEngine *fontEngine, const QTransform &t) const
{
- float det = t.determinant();
-
- // Don't try to cache huge fonts or vastly transformed fonts
- return t.type() < QTransform::TxProject
- && QPaintEngineEx::shouldDrawCachedGlyphs(fontEngine, t)
- && det >= 0.25f && det <= 4.f;
+ // Don't try to cache vastly transformed fonts
+ return t.type() < QTransform::TxProject && QPaintEngineEx::shouldDrawCachedGlyphs(fontEngine, t);
}
void QGL2PaintEngineExPrivate::transferMode(EngineMode newMode)