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>
This commit is contained in:
Herb Derby 2019-11-18 18:58:20 -05:00 committed by Skia Commit-Bot
parent 59f991a31f
commit d667e61cfb

View File

@ -443,7 +443,7 @@ void GrTextBlob::SubRun::computeTranslation(const SkMatrix& viewMatrix,
SkScalar x, SkScalar y, SkScalar* transX, SkScalar x, SkScalar y, SkScalar* transX,
SkScalar* transY) { SkScalar* transY) {
// Don't use the matrix to translate on distance field for fallback subruns. // 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); x, y, fCurrentViewMatrix, fX, fY, transX, transY);
fCurrentViewMatrix = viewMatrix; fCurrentViewMatrix = viewMatrix;
fX = x; fX = x;