diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-10-25 11:16:47 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-10-25 15:04:17 +0200 |
commit | d1b7d7a8d16d222536534ccf92576ed1eb05e1a8 (patch) | |
tree | 878aaa1719bb45ee27aefb265232d7ec95e92906 /include | |
parent | ac0e74209c4f7a7eb7702468cecd3b996227c278 (diff) |
tdf#126788 speed up export to pdf of complex table document
Shaves another 20% off the export time, bringing us to roughly the same
time as before commit
commit 4fc3466d23010d9553c31c662650072483b81588
Date: Thu Apr 14 09:19:35 2022 +0200
do not cache layout glyphs if fallback is involved
Change-Id: Ic595d4be7b05d857f3328ec28d1ef1232203cb03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141798
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/glyphitemcache.hxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/vcl/glyphitemcache.hxx b/include/vcl/glyphitemcache.hxx index 6c151ffaabaf..6c4c1ea1294b 100644 --- a/include/vcl/glyphitemcache.hxx +++ b/include/vcl/glyphitemcache.hxx @@ -57,6 +57,12 @@ public: const vcl::text::TextLayoutCache* layoutCache = nullptr); void clear(); + /// Normally, we cannot cache glyphs when doing font fallback, because the font fallbacks + /// can cache during the lifetime of the cache, and they are not included in the cache key. + /// But during some processes, we can turn this on, as long as we remember to turn it off + /// at the end. + void SetCacheGlyphsWhenDoingFallbackFonts(bool bOK); + static SalLayoutGlyphsCache* self(); SalLayoutGlyphsCache(int size) // needs to be public for vcl::DeleteOnDeinit : mCachedGlyphs(size) @@ -102,6 +108,7 @@ private: SalLayoutGlyphs mLastTemporaryGlyphs; // If set, info about the last call which wanted a substring of the full text. std::optional<CachedGlyphsKey> mLastSubstringKey; + bool mbCacheGlyphsWhenDoingFallbackFonts = false; SalLayoutGlyphsCache(const SalLayoutGlyphsCache&) = delete; SalLayoutGlyphsCache& operator=(const SalLayoutGlyphsCache&) = delete; |