From 48c464a3c4fe12cb43b33666735cf3c26a038e66 Mon Sep 17 00:00:00 2001 From: Cary Clark Date: Mon, 16 Apr 2018 12:06:07 -0400 Subject: a more involved path is rect bug This is bug number ten in the series, and is the most interesting. It exploits that the code tracks corners 0, 2, and 3 but not corner 1. Changing the code to track all corners is the biggest so far, and while it (hopefully) simplifies things, the presence of new code may signify more bugs to come. R=robertphillips@google.com Bug: 824145,skia::7792 Change-Id: Ia18e4d80fbed06ae6d9c89dcb4c462c5610213cc Reviewed-on: https://skia-review.googlesource.com/121487 Reviewed-by: Robert Phillips Commit-Queue: Cary Clark --- gm/pathfill.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'gm/pathfill.cpp') diff --git a/gm/pathfill.cpp b/gm/pathfill.cpp index 1bf396c513..cb878abe14 100644 --- a/gm/pathfill.cpp +++ b/gm/pathfill.cpp @@ -433,7 +433,7 @@ DEF_SIMPLE_GM(rotatedcubicpath, canvas, 200, 200) { DEF_GM( return new PathFillGM; ) DEF_GM( return new PathInverseFillGM; ) -DEF_SIMPLE_GM(bug7792, canvas, 600, 600) { +DEF_SIMPLE_GM(bug7792, canvas, 600, 800) { // from skbug.com/7792 bug description SkPaint p; SkPath path; @@ -536,4 +536,15 @@ DEF_SIMPLE_GM(bug7792, canvas, 600, 600) { path.lineTo(75, 150); path.close(); canvas->drawPath(path, p); + // from skbug.com/7792#c29 + canvas->translate(-200 * 2, 200); + path.reset(); + path.moveTo(75, 75); + path.lineTo(150, 75); + path.lineTo(150, 150); + path.lineTo(75, 150); + path.lineTo(75, 250); + path.moveTo(75, 75); + path.close(); + canvas->drawPath(path, p); } -- cgit v1.2.3