diff options
author | Andy Shaw <andy.shaw@theqtcompany.com> | 2015-12-16 13:59:54 +0100 |
---|---|---|
committer | Andy Shaw <andy.shaw@theqtcompany.com> | 2015-12-16 13:15:12 +0000 |
commit | a88da6377da2e10998574ccc709bec014e2b75a5 (patch) | |
tree | 7a0544fa0bc80e97bd28e843f339c8358abdb922 | |
parent | Decrease the cache if necessary when adding a new font (diff) | |
download | qtbase-a88da6377da2e10998574ccc709bec014e2b75a5.tar.xz qtbase-a88da6377da2e10998574ccc709bec014e2b75a5.zip |
The cache_cost is measured in bytes and not kilobytes.
When increaseCost() is called then it will convert from bytes to kilobytes
so we need to specify the cache_cost to be in bytes.
Task-number: QTBUG-47812
Change-Id: I842514c9ab4d86b60b2beb6c80979156ea0de59c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
-rw-r--r-- | src/gui/text/qfontengine_ft.cpp | 2 | ||||
-rw-r--r-- | src/gui/text/qfontengine_p.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp index 37be0afccf..1177305f6e 100644 --- a/src/gui/text/qfontengine_ft.cpp +++ b/src/gui/text/qfontengine_ft.cpp @@ -621,7 +621,7 @@ QFontEngineFT::QFontEngineFT(const QFontDef &fd) matrix.yy = 0x10000; matrix.xy = 0; matrix.yx = 0; - cache_cost = 100; + cache_cost = 100 * 1024; kerning_pairs_loaded = false; transform = false; embolden = false; diff --git a/src/gui/text/qfontengine_p.h b/src/gui/text/qfontengine_p.h index bb34155d31..6f4fabe1f6 100644 --- a/src/gui/text/qfontengine_p.h +++ b/src/gui/text/qfontengine_p.h @@ -277,7 +277,7 @@ public: qt_get_font_table_func_t get_font_table; } faceData; - uint cache_cost; // amount of mem used in kb by the font + uint cache_cost; // amount of mem used in bytes by the font uint fsType : 16; bool symbol; struct KernPair { |