Use a MRUCache for typeface cache used by Harfbuzz
This CL is replacing the previous cache by an MRUCache. The previous cache was an 'std::map' and was unbounded. It was not an issue since typically the amount of typeface loaded is low on the browser side. Unfortunately, that was not the case when expensive fallback fonts were used and lot of fonts were installed on the user computer. The GlyphCache is still an std::map, but it is bounded to the max amount of glyphs that a font can have (e.g. 16-bits). Bug: 890298 Change-Id: I1148ea7ebfc285dfcc05e8da454db830e809ebb9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1874246 Commit-Queue: Etienne Bergeron <etienneb@chromium.org> Reviewed-by:Alexei Svitkine <asvitkine@chromium.org> Reviewed-by:
Robert Liao <robliao@chromium.org> Cr-Commit-Position: refs/heads/master@{#709101}
Showing
Please register or sign in to comment