Kaydet (Commit) 6143a7ee authored tarafından Stephan Bergmann's avatar Stephan Bergmann

GlyphCachePeer::mnBytesUsed is always zero

...at least since 1c064d14 "I don't see that any
of this makes sense anymore" removed the last uses of it from
X11GlyphPeer::RemovingGlyph.

Change-Id: Ic8c879ac6023a1e796da220dd61dc33750aaad60
üst 0feaf0d6
......@@ -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();
}
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment