Remove GrFontScaler class.
This class is now effectively a set of helpers for interacting with a SkGlyphCache by GrBatchTextStrike. The class is deleted and the code is made into static functions in GrBatchFontCache.cpp
BUG=chromium:608566
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1985163002
Review-Url: https://codereview.chromium.org/1985163002
diff --git a/src/gpu/text/GrAtlasTextBlob.cpp b/src/gpu/text/GrAtlasTextBlob.cpp
index 03260a6..54af7af 100644
--- a/src/gpu/text/GrAtlasTextBlob.cpp
+++ b/src/gpu/text/GrAtlasTextBlob.cpp
@@ -48,7 +48,6 @@
return cacheBlob;
}
-
SkGlyphCache* GrAtlasTextBlob::setupCache(int runIndex,
const SkSurfaceProps& props,
uint32_t scalerContextFlags,
@@ -69,12 +68,12 @@
GrColor color,
GrBatchTextStrike* strike,
GrGlyph* glyph,
- GrFontScaler* scaler, const SkGlyph& skGlyph,
+ SkGlyphCache* cache, const SkGlyph& skGlyph,
SkScalar x, SkScalar y, SkScalar scale, bool applyVM) {
// If the glyph is too large we fall back to paths
if (glyph->fTooLargeForAtlas) {
- this->appendLargeGlyph(glyph, scaler, skGlyph, x, y, scale, applyVM);
+ this->appendLargeGlyph(glyph, cache, skGlyph, x, y, scale, applyVM);
return;
}
@@ -152,10 +151,10 @@
subRun->glyphAppended();
}
-void GrAtlasTextBlob::appendLargeGlyph(GrGlyph* glyph, GrFontScaler* scaler, const SkGlyph& skGlyph,
+void GrAtlasTextBlob::appendLargeGlyph(GrGlyph* glyph, SkGlyphCache* cache, const SkGlyph& skGlyph,
SkScalar x, SkScalar y, SkScalar scale, bool applyVM) {
if (nullptr == glyph->fPath) {
- const SkPath* glyphPath = scaler->getGlyphPath(skGlyph);
+ const SkPath* glyphPath = cache->findPath(skGlyph);
if (!glyphPath) {
return;
}