diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2018-10-05 17:08:49 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2018-10-06 16:23:44 +0200 |
commit | 16a338e173083954a9932a3a4005f172309c784e (patch) | |
tree | c401b0f8857e61147d5a0b2d7dc239fed9e047d5 /vcl/inc/impfontcache.hxx | |
parent | 01a782d2ceb741d20721b44d26d862d80b47d226 (diff) |
Convert ImplFontCache to use o3tl::lru_map
We still do our own cleanup of the LRU map, as we can't drop
any fonts in use.
Change-Id: I8ec5c6ce8f80893635621357e9085950e7010f5b
Reviewed-on: https://gerrit.libreoffice.org/61455
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/inc/impfontcache.hxx')
-rw-r--r-- | vcl/inc/impfontcache.hxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/inc/impfontcache.hxx b/vcl/inc/impfontcache.hxx index c96994300176..ee39883f2199 100644 --- a/vcl/inc/impfontcache.hxx +++ b/vcl/inc/impfontcache.hxx @@ -69,7 +69,8 @@ private: // cache of recently used font instances struct IFSD_Equal { bool operator()( const FontSelectPattern&, const FontSelectPattern& ) const; }; struct IFSD_Hash { size_t operator()( const FontSelectPattern& ) const; }; - typedef std::unordered_map<FontSelectPattern, rtl::Reference<LogicalFontInstance>, IFSD_Hash, IFSD_Equal> FontInstanceList; + typedef o3tl::lru_map<FontSelectPattern, rtl::Reference<LogicalFontInstance>, IFSD_Hash, IFSD_Equal> FontInstanceList; + typedef FontInstanceList::key_value_pair_t FontInstanceListPair; LogicalFontInstance* mpLastHitCacheEntry; ///< keeps the last hit cache entry FontInstanceList maFontInstanceList; |