diff options
author | 2014-11-04 13:32:53 -0800 | |
---|---|---|
committer | 2014-11-04 13:32:53 -0800 | |
commit | 0e66aaa503fd30b9860c0306ae20e8d7758b0fe6 (patch) | |
tree | 3d9e78e408ff30a3983409bd26076fdb6c7f4ca0 /src/gpu | |
parent | 7b8646669f5b1e2daddf53764bcde62d743ff076 (diff) |
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
Diffstat (limited to 'src/gpu')
-rwxr-xr-x | src/gpu/GrDistanceFieldTextContext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gpu/GrDistanceFieldTextContext.cpp b/src/gpu/GrDistanceFieldTextContext.cpp index 5c9019b2b2..1976cf16a3 100755 --- a/src/gpu/GrDistanceFieldTextContext.cpp +++ b/src/gpu/GrDistanceFieldTextContext.cpp @@ -548,7 +548,7 @@ bool GrDistanceFieldTextContext::appendGlyph(GrGlyph::PackedID packed, 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); |