aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/pathfill.cpp
diff options
context:
space:
mode:
authorGravatar Cary Clark <caryclark@skia.org>2018-04-18 12:25:08 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-04-18 17:46:03 +0000
commitb120e9291a7d43347ebce89de522a15771cd9dea (patch)
tree77a2153ecda21fadfba3f13d90a888e44a43d587 /gm/pathfill.cpp
parent1ccaa6e056296db61eb1af2668a23995fe98e6b3 (diff)
fix path is rect flaw exposed by gold
One of the path is rect bug fixes changed the behavior of zero-length strokes which showed up as a change in Gold. The bug is if a rect is defined by a series of colinear movetos, the bounds did not work out if the rect started and stopped in the middle of a side. R=robertphillips@google.com Bug: 824145,skia:7792 Change-Id: I226545efeda03dedd928eebc120d2508b428fef0 Reviewed-on: https://skia-review.googlesource.com/122002 Auto-Submit: Cary Clark <caryclark@skia.org> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Cary Clark <caryclark@skia.org>
Diffstat (limited to 'gm/pathfill.cpp')
-rw-r--r--gm/pathfill.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/gm/pathfill.cpp b/gm/pathfill.cpp
index ebe6d4a340..23fd5302ae 100644
--- a/gm/pathfill.cpp
+++ b/gm/pathfill.cpp
@@ -576,4 +576,16 @@ DEF_SIMPLE_GM(bug7792, canvas, 800, 800) {
path.lineTo(75, 150);
path.lineTo(75, 100);
canvas->drawPath(path, p);
+ // from zero_length_paths_aa
+ canvas->translate(0, 200);
+ path.reset();
+ path.moveTo(150, 100);
+ path.lineTo(150, 100);
+ path.lineTo(150, 150);
+ path.lineTo(75, 150);
+ path.lineTo(75, 100);
+ path.lineTo(75, 75);
+ path.lineTo(150, 75);
+ path.close();
+ canvas->drawPath(path, p);
}