From c1b11f1db69bea8d64ebf656ae92ea9ec6dbb40f Mon Sep 17 00:00:00 2001 From: reed Date: Fri, 13 Mar 2015 08:48:26 -0700 Subject: 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 --- tests/RegionTest.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/RegionTest.cpp') 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 { -- cgit v1.2.3