Clip text geometrically when possible.
Currently when we clip text we can't batch the clipped text with non-clipped text.
By modifying the quads and texCoords we can produce the same effect, and allow batching.
Includes some minor text code cleanup.
Bug: skia:6990
Change-Id: Ibfd4bc2fdc2d7680071e2abddd4d77fc3017e3d3
Reviewed-on: https://skia-review.googlesource.com/60780
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/text/GrAtlasTextBlob_regenInOp.cpp b/src/gpu/text/GrAtlasTextBlob_regenInOp.cpp
index 2d373ad..c551a2a 100644
--- a/src/gpu/text/GrAtlasTextBlob_regenInOp.cpp
+++ b/src/gpu/text/GrAtlasTextBlob_regenInOp.cpp
@@ -199,8 +199,8 @@
}
regen_vertices<regenPos, regenCol, regenTexCoords>(vertex, glyph, vertexStride,
- info->drawAsDistanceFields(), transX,
- transY, color);
+ info->drawAsDistanceFields(),
+ transX, transY, color);
vertex += vertexStride * GrAtlasTextOp::kVerticesPerGlyph;
helper->incGlyphCount();
}