aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2018-02-27 15:44:36 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-02-27 21:03:49 +0000
commitbb586b2eeba59af265c9efc20d7e9795191e046d (patch)
tree2c26544bef3ae53dea67ea9f0eebe36a72f8d50b /tests
parent84fdd4fcba03e656b88aa2a9586671f328b36436 (diff)
fix crasher in path-->region
Bug: skia:7491 Change-Id: I7e8b9fbe43098094d5935331107c3f40fb6971ec Reviewed-on: https://skia-review.googlesource.com/110721 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Cary Clark <caryclark@google.com> Reviewed-by: Yuqian Li <liyuqian@google.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/RegionTest.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/RegionTest.cpp b/tests/RegionTest.cpp
index be84d14c14..422e06e968 100644
--- a/tests/RegionTest.cpp
+++ b/tests/RegionTest.cpp
@@ -419,3 +419,18 @@ DEF_TEST(region_toobig, reporter) {
REPORTER_ASSERT(reporter, rgn.isEmpty());
}
+DEF_TEST(region_inverse_union_skbug_7491, reporter) {
+ SkPath path;
+ path.setFillType(SkPath::kInverseWinding_FillType);
+ path.moveTo(10, 20); path.lineTo(10, 30); path.lineTo(10.1f, 10); path.close();
+
+ SkRegion clip;
+ clip.op(SkIRect::MakeLTRB(10, 10, 15, 20), SkRegion::kUnion_Op);
+ clip.op(SkIRect::MakeLTRB(20, 10, 25, 20), SkRegion::kUnion_Op);
+
+ SkRegion rgn;
+ rgn.setPath(path, clip);
+
+ REPORTER_ASSERT(reporter, clip == rgn);
+}
+