aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/strokefill.cpp
diff options
context:
space:
mode:
authorGravatar Stephen White <senorblanco@chromium.org>2017-08-23 09:37:16 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-23 13:54:25 +0000
commit2cee283fda939dd982900a9e9a03bd29b69a0d6c (patch)
tree8a4a0db8cfa7ef993a87f684514552fce00c97cb /gm/strokefill.cpp
parent9d9022477fb3bbbdba8f79b09d734b4c7344bebe (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. 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 <robertphillips@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
Diffstat (limited to 'gm/strokefill.cpp')
-rw-r--r--gm/strokefill.cpp16
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();
+}