diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-14 09:43:10 +1100 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-14 09:52:22 +1100 |
commit | 3a0d7c93f80a6adbbd7dce8b9eeb82270b2a89aa (patch) | |
tree | 35f4eaac1209cfa29a822ec26c0f2d450372272b /vcl/inc/outdev.h | |
parent | d406d7c3a649bcbbe3377338707221e39f03a639 (diff) |
vcl: move ImplFontCache into own private header
Change-Id: Ic4444f54fabe03319de9add93653f6b7c91d6fce
Diffstat (limited to 'vcl/inc/outdev.h')
-rw-r--r-- | vcl/inc/outdev.h | 35 |
1 files changed, 1 insertions, 34 deletions
diff --git a/vcl/inc/outdev.h b/vcl/inc/outdev.h index 9310cfe2d55b..fcca71ec6013 100644 --- a/vcl/inc/outdev.h +++ b/vcl/inc/outdev.h @@ -29,6 +29,7 @@ #include "fontinstance.hxx" #include "PhysicalFontFace.hxx" +#include "impfontcache.hxx" class Size; namespace vcl { class Font; } @@ -124,40 +125,6 @@ public: virtual bool FindFontSubstitute( FontSelectPattern&, OUString& rMissingCodes ) const = 0; }; -// TODO: closely couple with PhysicalFontCollection - -class ImplFontCache -{ -private: - LogicalFontInstance* mpFirstEntry; - int mnRef0Count; // number of unreferenced LogicalFontInstances - - // 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,LogicalFontInstance*,IFSD_Hash,IFSD_Equal > FontInstanceList; - FontInstanceList maFontInstanceList; - - int CountUnreferencedEntries() const; - -public: - ImplFontCache(); - ~ImplFontCache(); - - LogicalFontInstance* GetFontInstance( PhysicalFontCollection*, - const vcl::Font&, const Size& rPixelSize, float fExactHeight); - LogicalFontInstance* GetFontInstance( PhysicalFontCollection*, FontSelectPattern& ); - LogicalFontInstance* GetGlyphFallbackFont( PhysicalFontCollection*, FontSelectPattern&, - int nFallbackLevel, OUString& rMissingCodes ); - - /// Increase the refcount of the given LogicalFontInstance. - void Acquire(LogicalFontInstance*); - /// Decrease the refcount and potentially cleanup the entries with zero refcount from the cache. - void Release(LogicalFontInstance*); - - void Invalidate(); -}; - namespace vcl { struct ControlLayoutData; } // #i75163# namespace basegfx { class B2DHomMatrix; } |