Isolate fGlyphs in SubRun
Add glyphCount to return the number of glyphs and
grGlyph to return a grGlyph from fGlyphs.
Bug: skia:10251
Change-Id: I15f77a032b9eb9aa736ccd810900f2425fc4c059
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/290296
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/ops/GrAtlasTextOp.cpp b/src/gpu/ops/GrAtlasTextOp.cpp
index 80a34c6..cc7611f 100644
--- a/src/gpu/ops/GrAtlasTextOp.cpp
+++ b/src/gpu/ops/GrAtlasTextOp.cpp
@@ -43,7 +43,7 @@
, fDFGPFlags{DFGPFlags}
, fGeoDataAllocSize{kMinGeometryAllocated}
, fProcessors{std::move(paint)}
- , fNumGlyphs{SkTo<int>(subrun->fGlyphs.size())} {
+ , fNumGlyphs{subrun->glyphCount()} {
GrAtlasTextOp::Geometry& geometry = fGeoData[0];
// Unref handled in ~GrAtlasTextOp().
@@ -390,7 +390,7 @@
// Where the subRun begins and ends relative to totalGlyphsRegened.
int subRunBegin = totalGlyphsRegened;
- int subRunEnd = subRunBegin + subRun->fGlyphs.count();
+ int subRunEnd = subRunBegin + subRun->glyphCount();
// Draw all the glyphs in the subRun.
while (totalGlyphsRegened < subRunEnd) {