diff options
author | Cary Clark <caryclark@skia.org> | 2018-04-19 07:37:29 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-19 12:11:34 +0000 |
commit | dbc59ba23b5cb70cdf77cfdb6cbe372223a17832 (patch) | |
tree | 4bde9110568cf5f518958d92d0030b7c887a77fd /gm | |
parent | 9599b0fd91778955786fafdcda97e4adb65cabf7 (diff) |
path is rect track corners
This was triggered by an exploit that started the first
edge well outside the final rectangle, causing the captured
to exceed the correct result.
Ivan observes that we really only want the first and third
corners to compute the bounds, so remove the tracking code
that looks for a valid range of points, and record the
corners instead.
R=robertphillips@google.com
Bug: 824145,skia:7792
Change-Id: If228573d0f05c7158dba8142c144d13834e691ec
Reviewed-on: https://skia-review.googlesource.com/122081
Commit-Queue: Cary Clark <caryclark@skia.org>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Auto-Submit: Cary Clark <caryclark@skia.org>
Diffstat (limited to 'gm')
-rw-r--r-- | gm/pathfill.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gm/pathfill.cpp b/gm/pathfill.cpp index 23fd5302ae..2f44503c4e 100644 --- a/gm/pathfill.cpp +++ b/gm/pathfill.cpp @@ -588,4 +588,26 @@ DEF_SIMPLE_GM(bug7792, canvas, 800, 800) { path.lineTo(150, 75); path.close(); canvas->drawPath(path, p); + // from skbug.com/7792#c41 + canvas->translate(0, 200); + path.reset(); + path.moveTo(75, 75); + path.lineTo(150, 75); + path.lineTo(150, 150); + path.lineTo(140, 150); + path.lineTo(140, 75); + path.moveTo(75, 75); + path.close(); + canvas->drawPath(path, p); + // from skbug.com/7792#c53 + canvas->translate(0, 200); + path.reset(); + path.moveTo(75, 75); + path.lineTo(150, 75); + path.lineTo(150, 150); + path.lineTo(140, 150); + path.lineTo(140, 75); + path.moveTo(75, 75); + path.close(); + canvas->drawPath(path, p); } |