summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@digia.com>2012-10-01 16:57:50 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-02 10:43:48 +0200
commit12590582a2f6769126906aab710a8401409a4b4a (patch)
treefcf7520225eb8071ceebb14eeefe8f2fdd6f20df /src/gui/opengl
parent9b201853ad02fa8af86f8ea36d691a034eaf0cbd (diff)
Fixed text drawing in OpenGL 2 paint engine.
Regressions introduced in 8d762c9caea4f8b9ff589b6c23564f4e37242745 and f4c1c2f939e1cd6e08197284edb84b202cd6749e. Task-number: QTBUG-24453 Change-Id: Ib1cb05693cde2d6066476a350eb95eaa503ee53c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/gui/opengl')
-rw-r--r--src/gui/opengl/qopenglpaintengine.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/opengl/qopenglpaintengine.cpp b/src/gui/opengl/qopenglpaintengine.cpp
index c33cdb6ad0..e0f1fe50a6 100644
--- a/src/gui/opengl/qopenglpaintengine.cpp
+++ b/src/gui/opengl/qopenglpaintengine.cpp
@@ -1410,7 +1410,7 @@ void QOpenGL2PaintEngineEx::drawStaticTextItem(QStaticTextItem *textItem)
// don't try to cache huge fonts or vastly transformed fonts
QFontEngine *fontEngine = textItem->fontEngine();
- if (shouldDrawCachedGlyphs(fontEngine, 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;
@@ -1464,7 +1464,7 @@ void QOpenGL2PaintEngineEx::drawTextItem(const QPointF &p, const QTextItem &text
bool drawCached = txtype < QTransform::TxProject;
// don't try to cache huge fonts or vastly transformed fonts
- if (shouldDrawCachedGlyphs(ti.fontEngine, 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