Fixed text drawing in OpenGL 2 paint engine.
Regressions introduced in8d762c9cae
andf4c1c2f939
. Task-number: QTBUG-24453 Change-Id: Ib1cb05693cde2d6066476a350eb95eaa503ee53c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
This commit is contained in:
parent
9b201853ad
commit
12590582a2
@ -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
|
||||
|
@ -1443,7 +1443,7 @@ void QGL2PaintEngineEx::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;
|
||||
@ -1501,7 +1501,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
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user