diff options
author | Andy Shaw <andy.shaw@digia.com> | 2015-12-10 08:35:14 +0100 |
---|---|---|
committer | Andy Shaw <andy.shaw@theqtcompany.com> | 2015-12-16 13:13:02 +0000 |
commit | e109b8a0f3c89c595f0da689e7ee847130e2ee47 (patch) | |
tree | f96fe350e1e915257e518e3f763340f4ee719aaa /src/gui/text/qfont_p.h | |
parent | 3fb0d851a08b7912152f98096c7308b3c430e605 (diff) |
Decrease the cache if necessary when adding a new font
It was possible for the cache to increase too quickly since it was
relying on the timer to decrease which caused problems with FreeType.
So by checking if it will be increased to be over the limit first before
adding the new font, we can decrease it earlier in preparation.
Task-number: QTBUG-47812
Task-number: QTBUG-49535
Change-Id: Iedc042d8903949140aa8c5257a9d54cde31a51be
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'src/gui/text/qfont_p.h')
-rw-r--r-- | src/gui/text/qfont_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/text/qfont_p.h b/src/gui/text/qfont_p.h index 25b5ef0b0e..ff9265ca19 100644 --- a/src/gui/text/qfont_p.h +++ b/src/gui/text/qfont_p.h @@ -276,6 +276,7 @@ private: void increaseCost(uint cost); void decreaseCost(uint cost); void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE; + void decreaseCache(); static const uint min_cost; uint total_cost, max_cost; |