diff options
author | jvanverth <jvanverth@google.com> | 2015-03-16 11:32:49 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-16 11:32:49 -0700 |
commit | 354eba5cb61801130a84378356434d3cc0a4b71a (patch) | |
tree | 8a9b58d43ebf04d7f02d6d5ffc62affa08b2cae9 /gm | |
parent | dfdec78a5d02e8690998741a9fe5b71a08ca3232 (diff) |
Fix SDF gradient calculation for non-uniform xforms
Also adds two non-uniform test cases to the dftext GM.
BUG=skia:3540
Review URL: https://codereview.chromium.org/1013773002
Diffstat (limited to 'gm')
-rwxr-xr-x | gm/dftext.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gm/dftext.cpp b/gm/dftext.cpp index 6544e891c9..2ce28c3930 100755 --- a/gm/dftext.cpp +++ b/gm/dftext.cpp @@ -196,6 +196,22 @@ protected: y += paint.getFontMetrics(NULL); } + // check skew + { + paint.setLCDRenderText(false); + SkAutoCanvasRestore acr(canvas, true); + canvas->skew(0.0f, 0.151515f); + paint.setTextSize(32); + canvas->drawText(text, textLen, 745, 70, paint); + } + { + paint.setLCDRenderText(true); + SkAutoCanvasRestore acr(canvas, true); + canvas->skew(0.5f, 0.0f); + paint.setTextSize(32); + canvas->drawText(text, textLen, 580, 230, paint); + } + // check color emoji paint.setTypeface(fTypeface); canvas->drawText(text, textLen, 670, 100, paint); |