use char-to-glyph cache in freetype typeface
Note: most of the slow-down (before this CL) is due to trashing freetype
objects (FTLibrary and FTFace), since these are ref-counted, but they
only persist long-term if there is an active scalercontext of the same
typeface.
A longer-term fix is to rethink the lifetimes of these freetype objects.
After that, we should remeasure onCharsToGlyphs(), and see if the
cache is still needed.
Bug: 935198
Bug: skia:8997
Change-Id: I1ba4adc57319d620ba4ac0fe0f2877ee62052cbd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209178
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
4 files changed