aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2018-05-23 10:08:53 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-23 14:33:51 +0000
commit5bedc80b269caba0ef9a649b5f6f3c3bd8dda596 (patch)
tree63051835782d8f7551500a988fc4404af977358e /tests
parentf104fec6d745540019556823f849535fe8872653 (diff)
reduce clip-limit for scan converter to avoid quad-edge overflow
For raster drawing, we already have a more conservative guard in SkBitmapDevice, which "tiles" the drawing on 8K boundaries (the smaller limit needed for antialiasing scan converters). This change is just needed for non-drawing uses of the scan converter. Bug: skia:7998 Bug: oss-fuzz:8483 Change-Id: Icfee9ca1ffcf93a2a8a3078d9ee10494fa04a6c7 Reviewed-on: https://skia-review.googlesource.com/129628 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/RegionTest.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/RegionTest.cpp b/tests/RegionTest.cpp
index 422e06e968..e286732e5e 100644
--- a/tests/RegionTest.cpp
+++ b/tests/RegionTest.cpp
@@ -434,3 +434,13 @@ DEF_TEST(region_inverse_union_skbug_7491, reporter) {
REPORTER_ASSERT(reporter, clip == rgn);
}
+DEF_TEST(giant_path_region, reporter) {
+ const SkScalar big = 32767;
+ SkPath path;
+ path.moveTo(-big, 0);
+ path.quadTo(big, 0, big, big);
+ SkIRect ir = path.getBounds().round();
+ SkRegion rgn;
+ rgn.setPath(path, SkRegion(ir));
+}
+