[Libreoffice-commits] core.git: vcl/source
Tor Lillqvist
tml at collabora.com
Wed May 21 03:38:06 PDT 2014
vcl/source/outdev/font.cxx | 38 ++------------------------------------
1 file changed, 2 insertions(+), 36 deletions(-)
New commits:
commit 224fd0a946f2f30c2e97a6a72f4e1d6b62795afb
Author: Tor Lillqvist <tml at collabora.com>
Date: Wed May 21 12:02:24 2014 +0300
Bin code that died in 2010 in d4dbc31173487a97e4b022f0bb9dae25440856a8
Change-Id: I5b88b7c66c1c3a3c68e6a837d10e7477cb7ae8fe
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index ef1f760..9e40712 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;
More information about the Libreoffice-commits
mailing list