summaryrefslogtreecommitdiff
path: root/vcl/inc/fontselect.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-06-05 14:16:23 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-06-08 22:29:50 +0200
commitc4c56de1b0e62ec866b519b2b24c5e805f0a86d3 (patch)
treea8a5b3c67b72804a27fd2f1aea39451691a3fa0c /vcl/inc/fontselect.hxx
parentd865866ec5cf6966757c9f2abd24b18a39f2f924 (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/fontselect.hxx')
-rw-r--r--vcl/inc/fontselect.hxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/inc/fontselect.hxx b/vcl/inc/fontselect.hxx
index 389077270758..efb88ad74ae1 100644
--- a/vcl/inc/fontselect.hxx
+++ b/vcl/inc/fontselect.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_VCL_INC_FONTSELECT_HXX
#include <i18nlangtag/lang.h>
+#include <rtl/ref.hxx>
#include "fontattributes.hxx"
@@ -80,7 +81,7 @@ public:
#endif
public: // TODO: change to private
- LogicalFontInstance* mpFontInstance; // pointer to the resulting FontCache entry
+ rtl::Reference<LogicalFontInstance> mpFontInstance; // pointer to the resulting FontCache entry
void copyAttributes(const FontSelectPatternAttributes &rAttributes);
};