Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(362)

Unified Diff: tests/CanvasTest.cpp

Issue 1008883002: Handle paths that do not report empty, but have no edges. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix uninit warning? Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkRegion_path.cpp ('k') | tests/RegionTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/CanvasTest.cpp
diff --git a/tests/CanvasTest.cpp b/tests/CanvasTest.cpp
index 98cfbc158dcae6b959f19b36b7cd60c9fbcc612e..23d49834c23a2c27e82d60087e713bc0dd908688 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();
+}
« no previous file with comments | « src/core/SkRegion_path.cpp ('k') | tests/RegionTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698