Non-substantive GPU text changes
This CL pulls some cleanup changes out of the omnibus GPU text CL. It:
Removes the unused GrTextStrike::removeID method
Removes the unused GrTextStrike::countGlyphs method
Removes the GrTextureStrike::fAtlasedGlyphs member variable
Adds an "int SkSpan::count() const" helper method
Change-Id: I88eefd929a5576093de58af85582567d8df5610a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/280706
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Herb Derby <herb@google.com>
diff --git a/src/gpu/ops/GrAtlasTextOp.cpp b/src/gpu/ops/GrAtlasTextOp.cpp
index 8338e05..01024c6 100644
--- a/src/gpu/ops/GrAtlasTextOp.cpp
+++ b/src/gpu/ops/GrAtlasTextOp.cpp
@@ -367,7 +367,7 @@
// Where the subRun begins and ends relative to totalGlyphsRegened.
int subRunBegin = totalGlyphsRegened;
- int subRunEnd = subRunBegin + (int)subRun->fGlyphs.size();
+ int subRunEnd = subRunBegin + subRun->fGlyphs.count();
// Draw all the glyphs in the subRun.
while (totalGlyphsRegened < subRunEnd) {
@@ -379,7 +379,9 @@
auto[ok, glyphsRegenerated] = regenerator.regenerate(drawBegin, drawEnd);
// There was a problem allocating the glyph in the atlas. Bail.
- if(!ok) { return; }
+ if (!ok) {
+ return;
+ }
// Update all the vertices for glyphsRegenerate glyphs.
if (glyphsRegenerated > 0) {