aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/pathfill.cpp
diff options
context:
space:
mode:
authorGravatar Cary Clark <caryclark@skia.org>2018-04-12 10:29:46 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-04-12 15:05:40 +0000
commit31608c02c2533810587f5807c0c34f8ac19290b9 (patch)
treec65f44e3cbd4fd9b900c8ef134ac39591637a7cb /gm/pathfill.cpp
parentba375a88843160e6884023e9108ea84de8eb3a0f (diff)
another rect is path fix
This addresses comment #17 of skbug.com/7792. The bug overshoots the end and exploits that the first point tracked by close isn't the first point in the rectangle. Fixing this slightly regresses the example in comment #14; before it was treated as a filled rect but now it is not; this conservative approach doesn't cause any other regressions. bug7792 in pathfill.cpp verifies that all paths in the bug draw correctly by comparing CPU and GPU. R=robertphillips@google.com Bug: 824145,skia:7792 Change-Id: I55bea023d2ad7456c8c3ebd9d1df95fe34e0a0d4 Reviewed-on: https://skia-review.googlesource.com/120996 Commit-Queue: Cary Clark <caryclark@skia.org> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'gm/pathfill.cpp')
-rw-r--r--gm/pathfill.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/gm/pathfill.cpp b/gm/pathfill.cpp
index ff9f0083a2..18b30c9b0b 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, 400) {
+DEF_SIMPLE_GM(bug7792, canvas, 600, 600) {
// from skbug.com/7792 bug description
SkPaint p;
SkPath path;
@@ -498,4 +498,15 @@ DEF_SIMPLE_GM(bug7792, canvas, 600, 400) {
path.lineTo(75, 150);
path.moveTo(250, 75);
canvas->drawPath(path, p);
+ // from skbug.com/7792 comment 17
+ canvas->translate(-200 * 2, 200);
+ path.reset();
+ path.moveTo(75, 10);
+ path.moveTo(75, 75);
+ path.lineTo(150, 75);
+ path.lineTo(150, 150);
+ path.lineTo(75, 150);
+ path.lineTo(75, 10);
+ path.close();
+ canvas->drawPath(path, p);
}