From d4349723fac9c0fd4dcf8c275fb7c756bdfdff7b Mon Sep 17 00:00:00 2001 From: caryclark Date: Thu, 23 Jul 2015 12:40:22 -0700 Subject: fix path ops fuzz buster Mark collapsed segments as done and remove collapsed segment references from the coincidence array. Also add test names to global debugging. R=fmalita@chromium.org BUG=512592 Review URL: https://codereview.chromium.org/1250293002 --- tests/PathOpsBuilderTest.cpp | 121 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) (limited to 'tests/PathOpsBuilderTest.cpp') diff --git a/tests/PathOpsBuilderTest.cpp b/tests/PathOpsBuilderTest.cpp index df77100b01..08fc632732 100644 --- a/tests/PathOpsBuilderTest.cpp +++ b/tests/PathOpsBuilderTest.cpp @@ -150,3 +150,124 @@ DEF_TEST(BuilderIssue502792_2, reporter) { SkPath result; builder.resolve(&result); } + +DEF_TEST(Fuzz846, reporter) { +/* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +*/ + SkPath clipCircle, clipRect; + SkPath inner; + clipCircle.addCircle(60, 60, 50); // + + inner.addRect(10, 30, 10+0, 30+60); // + inner.addRect(10, 30, 10+0, 30+60); // + inner.addRect(10, 30, 10+100, 30+60); // + inner.addRect(10, 30, 10+32668, 30+0); // + inner.addRect(10, 30, 10+100, 30+18446744073709551615.f); // + inner.addRect(10, 255, 10+100, 255+60); // + inner.addRect(0, 0, 0+100, 0+60); // + inner.addRect(10, 30, 10+100, 30+60); // + inner.addRect(10, 30, 10+100, 30+4294967236.f); // + inner.addRect(10, 30, 10+100, 30+60); // + clipRect.addPath(inner); + inner.reset(); + inner.addRect(10, 30, 10+0, 30+60); // + inner.addRect(10, 30, 10+0, 30+0.18093252719929986369568203f); // + inner.addRect(10, 30, 10+100, 30+60); // + inner.addRect(10, 30, 10+32668, 30+60); // + inner.addRect(10, 30, 10+100, 30+18446744073709551615.f); // + inner.addRect(10, 255, 10+100, 255+60); // + inner.addRect(2147483649.f, 30, 2147483649.f+100, 30+60); // + inner.addRect(10, 30, 10+100, 30+60); // + inner.addRect(10, 30, 10+100, 30+60); // + inner.addRect(10, 30, 10+100, 30+60); // + clipRect.addPath(inner); + inner.reset(); + inner.addRect(10, 30, 10+0, 30+60); // + inner.addRect(10, 30, 10+0, 30+60); // + inner.addRect(10, 30, 10+100, 30+60); // + inner.addRect(10, 30, 10+32668, 30+60); // + inner.addRect(10, 30, 10+100, 30+18446744073709551615.f); // + inner.addRect(10, 255, 10+100, 255+60); // + inner.addRect(2147483649.f, 30, 2147483649.f+100, 30+60); // + inner.addRect(10, 30, 10+100, 30+60); // + inner.addRect(10, 2879753595.f, 10+100, 30+2879753595.f); // + inner.addRect(10, 30, 10+100, 30+60); // + clipRect.addPath(inner); + inner.reset(); + inner.addRect(10, 30, 10+100, 30+60); // + inner.addRect(10, 30, 10+0, 30+60); // + inner.addRect(10, 30, 10+100, 30+60); // + inner.addRect(10, 30, 10+32668, 30+60); // + inner.addRect(10, 30, 10+100, 30+18446744073709551615.f); // + inner.addRect(10, 255, 10+100, 255+60); // + inner.addRect(2147483649.f, 30, 2147483649.f+100, 30+60); // + inner.addRect(10, 30, 10+100, 30+60); // + inner.addRect(10, 30, 10+100, 30+4294967236.f); // + inner.addRect(10, 30, 10+100, 30+4294967236.f); // + inner.addRect(10, 30, 10+100, 30+4294967236.f); // + inner.addRect(10, 30, 10+100, 30+4294967236.f); // + inner.addRect(10, 30, 10+100, 30+60); // + inner.addRect(757798030.f, 30, 757798030.f+100, 30+60); // + clipRect.addPath(inner); + + SkOpBuilder builder; + builder.add(clipCircle, kUnion_SkPathOp); + builder.add(clipRect, kDifference_SkPathOp); + SkPath result; + builder.resolve(&result); +} + -- cgit v1.2.3