diff options
-rw-r--r-- | vcl/generic/glyphs/glyphcache.cxx | 5 | ||||
-rw-r--r-- | vcl/inc/generic/glyphcache.hxx | 6 |
2 files changed, 3 insertions, 8 deletions
diff --git a/vcl/generic/glyphs/glyphcache.cxx b/vcl/generic/glyphs/glyphcache.cxx index 2509c00bdb54..cf75255aff8c 100644 --- a/vcl/generic/glyphs/glyphcache.cxx +++ b/vcl/generic/glyphs/glyphcache.cxx @@ -223,8 +223,7 @@ void GlyphCache::UncacheFont( ServerFont& rServerFont ) // user who wants to release it only got const ServerFonts. // The caching algorithm needs a non-const object ServerFont* pFont = const_cast<ServerFont*>( &rServerFont ); - if( (pFont->Release() <= 0) - && (mnMaxSize <= (mnBytesUsed + mrPeer.GetByteCount())) ) + if( (pFont->Release() <= 0) && (mnMaxSize <= mnBytesUsed) ) { mpCurrentGCFont = pFont; GarbageCollect(); @@ -296,7 +295,7 @@ inline void GlyphCache::AddedGlyph( ServerFont& rServerFont, GlyphData& rGlyphDa void GlyphCache::GrowNotify() { - if( (mnBytesUsed + mrPeer.GetByteCount()) > mnMaxSize ) + if( mnBytesUsed > mnMaxSize ) GarbageCollect(); } diff --git a/vcl/inc/generic/glyphcache.hxx b/vcl/inc/generic/glyphcache.hxx index a47b25feea37..b5e8d75cfd54 100644 --- a/vcl/inc/generic/glyphcache.hxx +++ b/vcl/inc/generic/glyphcache.hxx @@ -322,16 +322,12 @@ public: class GlyphCachePeer { protected: - GlyphCachePeer() : mnBytesUsed(0) {} + GlyphCachePeer() {} virtual ~GlyphCachePeer() {} public: - sal_Int32 GetByteCount() const { return mnBytesUsed; } virtual void RemovingFont( ServerFont& ) {} virtual void RemovingGlyph( GlyphData& ) {} - -protected: - sal_Int32 mnBytesUsed; }; class VCL_DLLPUBLIC RawBitmap |