summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-05-21 12:02:24 +0300
committerTor Lillqvist <tml@collabora.com>2014-05-21 13:36:30 +0300
commit224fd0a946f2f30c2e97a6a72f4e1d6b62795afb (patch)
treea9f7b41bdcad6bae89c1893160a4db86602773e4
parent612e0c647ec9ef504a6ec1913c02b0d166d9aedc (diff)
Bin code that died in 2010 in d4dbc31173487a97e4b022f0bb9dae25440856a8
Change-Id: I5b88b7c66c1c3a3c68e6a837d10e7477cb7ae8fe
-rw-r--r--vcl/source/outdev/font.cxx38
1 files changed, 2 insertions, 36 deletions
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index ef1f760bfb44..9e40712e3051 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -231,42 +231,8 @@ bool OutputDevice::GetFontCharMap( FontCharMap& rFontCharMap ) const
if( !mpFontEntry )
return false;
-#ifdef ENABLE_IFC_CACHE // a little font charmap cache helps considerably
- static const int NMAXITEMS = 16;
- 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
- }
+ const ImplFontCharMap* pNewMap = mpGraphics->GetImplFontCharMap();
+ rFontCharMap.Reset( pNewMap );
if( rFontCharMap.IsDefaultMap() )
return false;