DFText: fix placement of glyphs when we fall back to paths
Rendering a glyph with a path wants to place it at the (sx, sy) we get
as input to the method, but we add (dx, dy) for the clipRect check.
Hence, we need to subtract that out before we render the path.
Review URL: https://codereview.chromium.org/699283003
diff --git a/src/gpu/GrDistanceFieldTextContext.cpp b/src/gpu/GrDistanceFieldTextContext.cpp
index 5c9019b..1976cf1 100755
--- a/src/gpu/GrDistanceFieldTextContext.cpp
+++ b/src/gpu/GrDistanceFieldTextContext.cpp
@@ -548,7 +548,7 @@
GrContext::AutoMatrix am;
SkMatrix ctm;
ctm.setScale(fTextRatio, fTextRatio);
- ctm.postTranslate(sx, sy);
+ ctm.postTranslate(sx - dx, sy - dy);
GrPaint tmpPaint(fPaint);
am.setPreConcat(fContext, ctm, &tmpPaint);
GrStrokeInfo strokeInfo(SkStrokeRec::kFill_InitStyle);