diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-05 14:16:23 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-08 22:29:50 +0200 |
commit | c4c56de1b0e62ec866b519b2b24c5e805f0a86d3 (patch) | |
tree | a8a5b3c67b72804a27fd2f1aea39451691a3fa0c /vcl/inc/quartz | |
parent | d865866ec5cf6966757c9f2abd24b18a39f2f924 (diff) |
hold LogicalFontInstance with rtl::Reference
instead of manual reference counting.
Also the releasing of not-currently-in-use LogicalFontInstance objects
from the cache is made less aggressive - we now only flush entries until
we have less than CACHE_SIZE instances, instead of flushing the whole
cache.
Change-Id: Ib235b132776b5f09ae8ae93a933c2eebe5fa9610
Reviewed-on: https://gerrit.libreoffice.org/55384
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/inc/quartz')
-rw-r--r-- | vcl/inc/quartz/salgdi.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/inc/quartz/salgdi.h b/vcl/inc/quartz/salgdi.h index 2f53a44d694e..1dd896058890 100644 --- a/vcl/inc/quartz/salgdi.h +++ b/vcl/inc/quartz/salgdi.h @@ -71,7 +71,7 @@ public: bool GetFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const; bool HasChar( sal_uInt32 cChar ) const; - LogicalFontInstance* CreateFontInstance(const FontSelectPattern&) const override; + rtl::Reference<LogicalFontInstance> CreateFontInstance(const FontSelectPattern&) const override; protected: CoreTextFontFace( const CoreTextFontFace& ); @@ -85,7 +85,7 @@ private: class CoreTextStyle : public LogicalFontInstance { - friend LogicalFontInstance* CoreTextFontFace::CreateFontInstance(const FontSelectPattern&) const; + friend rtl::Reference<LogicalFontInstance> CoreTextFontFace::CreateFontInstance(const FontSelectPattern&) const; public: ~CoreTextStyle(); @@ -159,7 +159,7 @@ class AquaSalGraphics : public SalGraphics RGBAColor maFillColor; // Device Font settings - CoreTextStyle* mpTextStyle[MAX_FALLBACK]; + rtl::Reference<CoreTextStyle> mpTextStyle[MAX_FALLBACK]; RGBAColor maTextColor; /// allows text to be rendered without antialiasing bool mbNonAntialiasedText; |