Only reposition the fallback vertices once.
We were shifting the verticies for the fallback subrun
twice when using paths to render. Once in regenerate,
and once using MapPoints.
BUG=chromium:913057
Change-Id: I4d2e977b0edbec22cbd57c45fe47c959d172908f
Reviewed-on: https://skia-review.googlesource.com/c/177920
Reviewed-by: Ben Wagner <bungeman@google.com>
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 f14c728..3b74fc5 100644
--- a/src/gpu/text/GrTextBlob.cpp
+++ b/src/gpu/text/GrTextBlob.cpp
@@ -468,8 +468,9 @@
void GrTextBlob::SubRun::computeTranslation(const SkMatrix& viewMatrix,
SkScalar x, SkScalar y, SkScalar* transX,
SkScalar* transY) {
- calculate_translation(!this->drawAsDistanceFields(), viewMatrix, x, y,
- fCurrentViewMatrix, fX, fY, transX, transY);
+ // Don't use the matrix to translate on distance field for fallback subruns.
+ calculate_translation(!this->drawAsDistanceFields() && !this->isFallback(), viewMatrix,
+ x, y, fCurrentViewMatrix, fX, fY, transX, transY);
fCurrentViewMatrix = viewMatrix;
fX = x;
fY = y;