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
parent
73e93f4300
commit
155a20628b
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue