Kaydet (Commit) 224fd0a9 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Bin code that died in 2010 in d4dbc311

Change-Id: I5b88b7c66c1c3a3c68e6a837d10e7477cb7ae8fe
üst 612e0c64
...@@ -231,42 +231,8 @@ bool OutputDevice::GetFontCharMap( FontCharMap& rFontCharMap ) const ...@@ -231,42 +231,8 @@ bool OutputDevice::GetFontCharMap( FontCharMap& rFontCharMap ) const
if( !mpFontEntry ) if( !mpFontEntry )
return false; return false;
#ifdef ENABLE_IFC_CACHE // a little font charmap cache helps considerably const ImplFontCharMap* pNewMap = mpGraphics->GetImplFontCharMap();
static const int NMAXITEMS = 16; rFontCharMap.Reset( pNewMap );
static int nUsedItems = 0, nCurItem = 0;
struct CharMapCacheItem { const PhysicalFontFace* mpFontData; FontCharMap maCharMap; };
static CharMapCacheItem aCache[ NMAXITEMS ];
const PhysicalFontFace* pFontData = mpFontEntry->maFontSelData.mpFontData;
int i;
for( i = nUsedItems; --i >= 0; )
if( pFontData == aCache[i].mpFontData )
break;
if( i >= 0 ) // found in cache
{
rFontCharMap.Reset( aCache[i].maCharMap.mpImpl );
}
else // need to cache
#endif // ENABLE_IFC_CACHE
{
const ImplFontCharMap* pNewMap = mpGraphics->GetImplFontCharMap();
rFontCharMap.Reset( pNewMap );
#ifdef ENABLE_IFC_CACHE
// manage cache round-robin and insert data
CharMapCacheItem& rItem = aCache[ nCurItem ];
rItem.mpFontData = pFontData;
rItem.maCharMap.Reset( pNewMap );
if( ++nCurItem >= NMAXITEMS )
nCurItem = 0;
if( ++nUsedItems >= NMAXITEMS )
nUsedItems = NMAXITEMS;
#endif // ENABLE_IFC_CACHE
}
if( rFontCharMap.IsDefaultMap() ) if( rFontCharMap.IsDefaultMap() )
return false; return false;
......
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