Fallback direct glyphs not translating properly
There are two kinds of fallback glyphs. Ones rendered
directly (without transform) from the cache, and glyphs
that need to be transformed when drawn. Make the distinction
based on need of transform rather than fallback.
Bug: skia:9648
Change-Id: Icc87b3272ea7a8c80b21411bbc1f191fc1334641
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255263
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Herb Derby <herb@google.com>
diff --git a/src/gpu/text/GrTextBlob.cpp b/src/gpu/text/GrTextBlob.cpp
index 7d46847..14f5055 100644
--- a/src/gpu/text/GrTextBlob.cpp
+++ b/src/gpu/text/GrTextBlob.cpp
@@ -443,7 +443,7 @@
SkScalar x, SkScalar y, SkScalar* transX,
SkScalar* transY) {
// Don't use the matrix to translate on distance field for fallback subruns.
- calculate_translation(!this->drawAsDistanceFields() && !this->isFallback(), viewMatrix,
+ calculate_translation(!this->drawAsDistanceFields() && !this->needsTransform(), viewMatrix,
x, y, fCurrentViewMatrix, fX, fY, transX, transY);
fCurrentViewMatrix = viewMatrix;
fX = x;