diff options
author | Stephen White <senorblanco@chromium.org> | 2017-08-22 10:20:51 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-08-22 18:54:37 +0000 |
commit | 267641a90cb18a430b0a84910f651e2181744fd3 (patch) | |
tree | f357ce0848f5abeecf9d761f79e242f4b9e46098 /gm/strokefill.cpp | |
parent | 620cc248517a509040d3f94f29710edf3a151c5b (diff) |
Fix artifacts on tiny stroked paths scaled up a lot.
Set doConsumeDegenerates to false when calling SkPath::Iter::next() for
all paths which are not in screen space. These lines are not degenerate
for world space paths.
Bug: skia:6987
Change-Id: I411faf594bf8a15891bfff08691e86679b7741ac
Reviewed-on: https://skia-review.googlesource.com/36881
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Diffstat (limited to 'gm/strokefill.cpp')
-rw-r--r-- | gm/strokefill.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gm/strokefill.cpp b/gm/strokefill.cpp index 51936403e8..2e96cd7c36 100644 --- a/gm/strokefill.cpp +++ b/gm/strokefill.cpp @@ -358,3 +358,19 @@ DEF_SIMPLE_GM(bug339297, canvas, 640, 480) { paint.setStrokeWidth(1); canvas->drawPath(path, paint); } + +DEF_SIMPLE_GM(bug6987, canvas, 200, 200) { + SkPaint paint; + paint.setStyle(SkPaint::kStroke_Style); + paint.setStrokeWidth(0.0001f); + paint.setAntiAlias(true); + SkPath path; + canvas->save(); + canvas->scale(50000.0f, 50000.0f); + path.moveTo(0.0005f, 0.0004f); + path.lineTo(0.0008f, 0.0010f); + path.lineTo(0.0002f, 0.0010f); + path.close(); + canvas->drawPath(path, paint); + canvas->restore(); +} |