diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-05-19 16:36:36 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-05-22 13:28:50 +0200 |
commit | f73980ed151e3d04b02cc463cf9fd6432f14ba03 (patch) | |
tree | 97c5ae2757221b4bc7f56aa90bc12d252301c66a /vcl/skia | |
parent | 78b7e1dfba4fb776db801c478a830057ff67d965 (diff) |
Related: tdf#132536 drop FreetypeManager FreetypeFont caching
the FreetypeFont only makes sense in the context of the FreetypeFontInstance it
belongs to so remove the faux "garbage collection" and just have FreetypeFontInstance
own the FreetypeFont and keep it simple.
Setting a value low enough to make the garbage collection kick in just crasheed
libreoffice by pulling FreetypeFont out from under living FreetypeFontInstance
seeing as the Cache/Uncache was by the FreeTypeTextRenderImpl not the
FreetypeFontInstance which had HarfBuff faces which continued to point to the
removed FreetypeFont
There is still a cache at the LogicalFontInstance level, so this aligns the
libfreetype platforms with windows, mac etc.
Change-Id: Iac669fae8dc1df81a5bc10d2943d84a2ff623180
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94546
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/skia')
-rw-r--r-- | vcl/skia/x11/textrender.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/skia/x11/textrender.cxx b/vcl/skia/x11/textrender.cxx index a980523476b3..13eff3012721 100644 --- a/vcl/skia/x11/textrender.cxx +++ b/vcl/skia/x11/textrender.cxx @@ -31,7 +31,7 @@ void SkiaTextRender::DrawTextLayout(const GenericSalLayout& rLayout, const SalGraphics& rGraphics) { const FreetypeFontInstance& rInstance = static_cast<FreetypeFontInstance&>(rLayout.GetFont()); - const FreetypeFont& rFont = *rInstance.GetFreetypeFont(); + const FreetypeFont& rFont = rInstance.GetFreetypeFont(); const FontSelectPattern& rFSD = rInstance.GetFontSelectPattern(); int nHeight = rFSD.mnHeight; int nWidth = rFSD.mnWidth ? rFSD.mnWidth : nHeight; |