aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/RegionTest.cpp
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2015-03-13 08:48:26 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-03-13 08:48:27 -0700
commitc1b11f1db69bea8d64ebf656ae92ea9ec6dbb40f (patch)
tree4a35f5ca94bb701f4c203f81b755c4d76f105958 /tests/RegionTest.cpp
parentf7076a13e2d4269903b34ef2780e1c84723e4477 (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/RegionTest.cpp')
-rw-r--r--tests/RegionTest.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/RegionTest.cpp b/tests/RegionTest.cpp
index ae58ae6e2e..acb81809de 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 {