summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontdatabase.cpp
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@viroteck.net>2016-11-11 15:29:28 +0100
committerRobin Burchell <robin.burchell@viroteck.net>2016-11-15 16:02:07 +0000
commitf2205c48c21a6b135f2f59d0cf46e72f90f9f0f4 (patch)
treed21fdb1091ef9b1abc62fead5b2416db15eacc79 /src/gui/text/qfontdatabase.cpp
parent628d367a9d618568167d43195c1118b7d7979da0 (diff)
QFontEngine: Cache whether or not a font can be smoothly scaled
This will be used by QtQuick to correct a performance regression introduced by 592614ea3ecd90ede2ae1b8e6579d1b898f474ec -- QFontDatabase::isSmoothlyScalable is quite computationally expensive; and now it is unconditionally expensive regardless of the platform. Change-Id: I82bfa65a963c6c3c276d574f2b379da4a9ba5b69 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/gui/text/qfontdatabase.cpp')
-rw-r--r--src/gui/text/qfontdatabase.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index f1b2e84a1e..f1478515f4 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -948,8 +948,8 @@ QFontEngine *loadSingleEngine(int script,
return 0;
}
+ engine->isSmoothlyScalable = style->smoothScalable;
fontCache->insertEngine(key, engine);
-
return engine;
}
}
@@ -972,6 +972,7 @@ QFontEngine *loadSingleEngine(int script,
return 0;
}
+ engine->isSmoothlyScalable = style->smoothScalable;
fontCache->insertEngine(key, engine);
if (Q_LIKELY(cacheForCommonScript && !engine->symbol)) {