From 2cee283fda939dd982900a9e9a03bd29b69a0d6c Mon Sep 17 00:00:00 2001 From: Stephen White Date: Wed, 23 Aug 2017 09:37:16 -0400 Subject: 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. Note: this change fixes only GrTessellatingPathRenderer and GrDefaultPathRenderer. GrMSAAPathRenderer still exhibits the bug. Bug: skia:6987 Change-Id: Ie3d494703211925c77052c68513948484e341486 Reviewed-on: https://skia-review.googlesource.com/37522 Reviewed-by: Robert Phillips Commit-Queue: Stephen White --- gm/strokefill.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'gm/strokefill.cpp') 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(); +} -- cgit v1.2.3