Kaydet (Commit) d4dbc311 authored tarafından Herbert Duerr [hdu]'s avatar Herbert Duerr [hdu]

#i113861# for platforms where ImplFontCharMap objects are cached in lower layers…

#i113861# for platforms where ImplFontCharMap objects are cached in lower layers the cache in OutputDevice is no longer beneficial
üst 34c6b390
...@@ -7987,7 +7987,7 @@ BOOL OutputDevice::GetFontCharMap( FontCharMap& rFontCharMap ) const ...@@ -7987,7 +7987,7 @@ BOOL OutputDevice::GetFontCharMap( FontCharMap& rFontCharMap ) const
if( !mpFontEntry ) if( !mpFontEntry )
return FALSE; return FALSE;
// a little font charmap cache helps considerably #ifdef ENABLE_IFC_CACHE // a little font charmap cache helps considerably
static const int NMAXITEMS = 16; static const int NMAXITEMS = 16;
static int nUsedItems = 0, nCurItem = 0; static int nUsedItems = 0, nCurItem = 0;
...@@ -8005,10 +8005,12 @@ BOOL OutputDevice::GetFontCharMap( FontCharMap& rFontCharMap ) const ...@@ -8005,10 +8005,12 @@ BOOL OutputDevice::GetFontCharMap( FontCharMap& rFontCharMap ) const
rFontCharMap.Reset( aCache[i].maCharMap.mpImpl ); rFontCharMap.Reset( aCache[i].maCharMap.mpImpl );
} }
else // need to cache else // need to cache
#endif // ENABLE_IFC_CACHE
{ {
const ImplFontCharMap* pNewMap = mpGraphics->GetImplFontCharMap(); const ImplFontCharMap* pNewMap = mpGraphics->GetImplFontCharMap();
rFontCharMap.Reset( pNewMap ); rFontCharMap.Reset( pNewMap );
#ifdef ENABLE_IFC_CACHE
// manage cache round-robin and insert data // manage cache round-robin and insert data
CharMapCacheItem& rItem = aCache[ nCurItem ]; CharMapCacheItem& rItem = aCache[ nCurItem ];
rItem.mpFontData = pFontData; rItem.mpFontData = pFontData;
...@@ -8019,6 +8021,7 @@ BOOL OutputDevice::GetFontCharMap( FontCharMap& rFontCharMap ) const ...@@ -8019,6 +8021,7 @@ BOOL OutputDevice::GetFontCharMap( FontCharMap& rFontCharMap ) const
if( ++nUsedItems >= NMAXITEMS ) if( ++nUsedItems >= NMAXITEMS )
nUsedItems = NMAXITEMS; nUsedItems = NMAXITEMS;
#endif // ENABLE_IFC_CACHE
} }
if( rFontCharMap.IsDefaultMap() ) if( rFontCharMap.IsDefaultMap() )
......
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