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>
bb10
Tor Arne Vestbø 2013-02-07 14:27:41 +01:00 committed by The Qt Project
parent 73e93f4300
commit 155a20628b
2 changed files with 4 additions and 12 deletions

View File

@ -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,

View File

@ -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)