diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/win/gdi/salfont.cxx | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx index 8056b46522a6..a5e240afc480 100644 --- a/vcl/win/gdi/salfont.cxx +++ b/vcl/win/gdi/salfont.cxx @@ -58,11 +58,6 @@ using namespace vcl; -// GetGlyphOutlineW() seems to be a little slow, and doesn't seem to do its own caching (tested on Windows10). -// TODO include the font as part of the cache key, then we won't need to clear it on font change -// The cache limit is set by the rough number of characters needed to read your average Asian newspaper. -static o3tl::lru_map<sal_GlyphId, tools::Rectangle> g_BoundRectCache(3000); - static const int MAXFONTHEIGHT = 2048; inline FIXED FixedFromDouble( double d ) @@ -853,8 +848,6 @@ HFONT WinSalGraphics::ImplDoSetFont(FontSelectPattern const * i_pFont, float& o_rFontScale, HFONT& o_rOldFont) { - // clear the cache on font change - g_BoundRectCache.clear(); HFONT hNewFont = nullptr; LOGFONTW aLogFont; @@ -1387,13 +1380,6 @@ void WinSalGraphics::ClearDevFontCache() bool WinSalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle& rRect) { - auto it = g_BoundRectCache.find(rGlyph.maGlyphId); - if (it != g_BoundRectCache.end()) - { - rRect = it->second; - return true; - } - WinFontInstance* pFont = mpWinFontEntry[rGlyph.mnFallbackLevel]; HFONT hNewFont = pFont ? pFont->GetHFONT() : mhFonts[rGlyph.mnFallbackLevel]; float fFontScale = pFont ? pFont->GetScale() : mfFontScale[rGlyph.mnFallbackLevel]; @@ -1427,8 +1413,6 @@ bool WinSalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle rRect.SetTop(static_cast<int>( fFontScale * rRect.Top() )); rRect.SetBottom(static_cast<int>( fFontScale * rRect.Bottom() ) + 1); - g_BoundRectCache.insert({rGlyph.maGlyphId, rRect}); - return true; } |