diff options
author | hdu <duerr@sun.com> | 2010-02-16 12:34:52 +0100 |
---|---|---|
committer | hdu <duerr@sun.com> | 2010-02-16 12:34:52 +0100 |
commit | a183962c8e325ee0d270181fc797b8f8bd74e538 (patch) | |
tree | d69fe17d92393423fe39bfedb26fd0d81488318c | |
parent | 90879796f7b668255ccb499394a2d1b99da4bede (diff) |
#i88303# added GlyphCache::InvalidateAllGlyphs(), dummy for now
-rw-r--r-- | vcl/inc/vcl/glyphcache.hxx | 7 | ||||
-rw-r--r-- | vcl/source/glyphs/glyphcache.cxx | 16 |
2 files changed, 16 insertions, 7 deletions
diff --git a/vcl/inc/vcl/glyphcache.hxx b/vcl/inc/vcl/glyphcache.hxx index 96f94ea5cf05..aa2d443a8c34 100644 --- a/vcl/inc/vcl/glyphcache.hxx +++ b/vcl/inc/vcl/glyphcache.hxx @@ -62,8 +62,8 @@ class ServerFontLayout; class VCL_DLLPUBLIC GlyphCache { public: - GlyphCache( GlyphCachePeer& ); - ~GlyphCache(); + explicit GlyphCache( GlyphCachePeer& ); + /*virtual*/ ~GlyphCache(); static GlyphCache& GetInstance(); void LoadFonts(); @@ -77,6 +77,7 @@ public: ServerFont* CacheFont( const ImplFontSelectData& ); void UncacheFont( ServerFont& ); + void InvalidateAllGlyphs(); protected: GlyphCachePeer& mrPeer; @@ -99,9 +100,7 @@ private: struct IFSD_Hash{ size_t operator()( const ImplFontSelectData& ) const; }; typedef ::std::hash_map<ImplFontSelectData,ServerFont*,IFSD_Hash,IFSD_Equal > FontList; FontList maFontList; -public: ULONG mnMaxSize; // max overall cache size in bytes -private: mutable ULONG mnBytesUsed; mutable long mnLruIndex; mutable int mnGlyphCount; diff --git a/vcl/source/glyphs/glyphcache.cxx b/vcl/source/glyphs/glyphcache.cxx index 17e70c539254..e1e1e5f60ad5 100644 --- a/vcl/source/glyphs/glyphcache.cxx +++ b/vcl/source/glyphs/glyphcache.cxx @@ -69,13 +69,22 @@ GlyphCache::GlyphCache( GlyphCachePeer& rPeer ) GlyphCache::~GlyphCache() { -// TODO: -// for( FontList::iterator it = maFontList.begin(); it != maFontList.end(); ++it ) -// delete const_cast<ServerFont*>( it->second ); + InvalidateAllGlyphs(); if( mpFtManager ) delete mpFtManager; } +// ----------------------------------------------------------------------- + +void GlyphCache::InvalidateAllGlyphs() +{ +#if 0 // TODO: implement uncaching of all glyph shapes and metrics + for( FontList::iterator it = maFontList.begin(); it != maFontList.end(); ++it ) + delete const_cast<ServerFont*>( it->second ); + maFontList.clear(); + mpCurrentGCFont = NULL; +#endif +} // ----------------------------------------------------------------------- @@ -582,3 +591,4 @@ int ExtraKernInfo::GetUnscaledKernValue( sal_Unicode cLeft, sal_Unicode cRight ) } // ======================================================================= + |