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

Unified Diff: tests/RegionTest.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 | « tests/CanvasTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/RegionTest.cpp
diff --git a/tests/RegionTest.cpp b/tests/RegionTest.cpp
index ae58ae6e2e07cb0b4c45b8469f8b7e51209c967b..acb81809de3bf4788d74a950928c740dfb6062d8 100644
--- a/tests/RegionTest.cpp
+++ b/tests/RegionTest.cpp
@@ -5,6 +5,7 @@
* found in the LICENSE file.
*/
+#include "SkPath.h"
#include "SkRandom.h"
#include "SkRegion.h"
#include "Test.h"
@@ -91,6 +92,13 @@ static void test_empties(skiatest::Reporter* reporter) {
REPORTER_ASSERT(reporter, !empty.contains(empty2));
REPORTER_ASSERT(reporter, !valid.contains(empty));
REPORTER_ASSERT(reporter, !empty.contains(valid));
+
+ SkPath emptyPath;
+ emptyPath.moveTo(1, 5);
+ emptyPath.close();
+ SkRegion openClip;
+ openClip.setRect(-16000, -16000, 16000, 16000);
+ empty.setPath(emptyPath, openClip); // should not assert
}
enum {
« no previous file with comments | « tests/CanvasTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698