| Index: tests/AAClipTest.cpp
|
| diff --git a/tests/AAClipTest.cpp b/tests/AAClipTest.cpp
|
| index 64e378455a751fb687757b2d75060940c59a2a08..605656514931b285db643b13847c37de699e0da2 100644
|
| --- a/tests/AAClipTest.cpp
|
| +++ b/tests/AAClipTest.cpp
|
| @@ -421,6 +421,22 @@ static void test_regressions() {
|
| }
|
| }
|
|
|
| +// Building aaclip meant aa-scan-convert a path into a huge clip.
|
| +// the old algorithm sized the supersampler to the size of the clip, which overflowed
|
| +// its internal 16bit coordinates. The fix was to intersect the clip+path_bounds before
|
| +// sizing the supersampler.
|
| +//
|
| +// Before the fix, the following code would assert in debug builds.
|
| +//
|
| +static void test_crbug_422693(skiatest::Reporter* reporter) {
|
| +#if 0
|
| + SkRasterClip rc(SkIRect::MakeLTRB(-25000, -25000, 25000, 25000));
|
| + SkPath path;
|
| + path.addCircle(50, 50, 50);
|
| + rc.op(path, rc.getBounds().size(), SkRegion::kIntersect_Op, true);
|
| +#endif
|
| +}
|
| +
|
| DEF_TEST(AAClip, reporter) {
|
| test_empty(reporter);
|
| test_path_bounds(reporter);
|
| @@ -430,4 +446,5 @@ DEF_TEST(AAClip, reporter) {
|
| test_regressions();
|
| test_nearly_integral(reporter);
|
| test_really_a_rect(reporter);
|
| + test_crbug_422693(reporter);
|
| }
|
|
|