diff options
author | reed <reed@google.com> | 2015-03-13 08:48:26 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-13 08:48:27 -0700 |
commit | c1b11f1db69bea8d64ebf656ae92ea9ec6dbb40f (patch) | |
tree | 4a35f5ca94bb701f4c203f81b755c4d76f105958 /tests/CanvasTest.cpp | |
parent | f7076a13e2d4269903b34ef2780e1c84723e4477 (diff) |
Handle paths that do not report empty, but have no edges.
patch from issue 999963005 at patchset 1 (http://crrev.com/999963005#ps1)
BUG=skia:3527
Review URL: https://codereview.chromium.org/1008883002
Diffstat (limited to 'tests/CanvasTest.cpp')
-rw-r--r-- | tests/CanvasTest.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/CanvasTest.cpp b/tests/CanvasTest.cpp index 98cfbc158d..23d49834c2 100644 --- a/tests/CanvasTest.cpp +++ b/tests/CanvasTest.cpp @@ -747,3 +747,19 @@ DEF_TEST(Canvas_SaveState, reporter) { canvas.restore(); REPORTER_ASSERT(reporter, 1 == canvas.getSaveCount()); } + +DEF_TEST(Canvas_ClipEmptyPath, reporter) { + SkCanvas canvas(10, 10); + canvas.save(); + SkPath path; + canvas.clipPath(path); + canvas.restore(); + canvas.save(); + path.moveTo(5, 5); + canvas.clipPath(path); + canvas.restore(); + canvas.save(); + path.moveTo(7, 7); + canvas.clipPath(path); // should not assert here + canvas.restore(); +} |