1. mst
  2. ooo340

Commits

hdu  committed a80f9f5

#i88303# added GlyphCache::InvalidateAllGlyphs(), dummy for now

  • Participants
  • Parent commits a659936
  • Branches default

Comments (0)

Files changed (2)

File vcl/inc/vcl/glyphcache.hxx

View file
  • Ignore whitespace
 class VCL_DLLPUBLIC GlyphCache
 {
 public:
-                                GlyphCache( GlyphCachePeer& );
-                                ~GlyphCache();
+    explicit                    GlyphCache( GlyphCachePeer& );
+    /*virtual*/                 ~GlyphCache();
 
     static GlyphCache&		GetInstance();
     void                        LoadFonts();
 
     ServerFont*                 CacheFont( const ImplFontSelectData& );
     void                        UncacheFont( ServerFont& );
+    void                        InvalidateAllGlyphs();
 
 protected:
     GlyphCachePeer&             mrPeer;
     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;

File vcl/source/glyphs/glyphcache.cxx

View file
  • Ignore whitespace
 
 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
+}
 
 // -----------------------------------------------------------------------
 
 }
 
 // =======================================================================
+