From 4efcb7d100e824926e03f598d616f6bda5682e14 Mon Sep 17 00:00:00 2001 From: Cary Clark Date: Fri, 2 Feb 2018 15:09:49 -0500 Subject: handle degenerate cubic loops fuzzer generated a cubic with a very tiny loop at one end. Breaking the cubic in two generated a piece so small it was discarded, passing the original along. Instead, use the loop detection as a hint that passing the original may fail further along. Keep the big piece, which is more linear than the original; and change its end to match the original input if the small piece isn't worth keeping. R=kjlubick Bug: skia:7480 Change-Id: If4c5cd46dbf7e16526269f2854e4f2278f427461 Reviewed-on: https://skia-review.googlesource.com/103100 Reviewed-by: Kevin Lubick Commit-Queue: Cary Clark --- tests/PathOpsCubicIntersectionTest.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/PathOpsCubicIntersectionTest.cpp') diff --git a/tests/PathOpsCubicIntersectionTest.cpp b/tests/PathOpsCubicIntersectionTest.cpp index 7871fde931..8a7ec1ac81 100644 --- a/tests/PathOpsCubicIntersectionTest.cpp +++ b/tests/PathOpsCubicIntersectionTest.cpp @@ -168,6 +168,7 @@ static const CubicPts testSet[] = { const int testSetCount = (int) SK_ARRAY_COUNT(testSet); static const CubicPts newTestSet[] = { + { { { 130.0427549999999997, 11417.41309999999976 },{ 130.2331240000000037, 11418.3192999999992 },{ 131.0370790000000056, 11419 },{ 132, 11419 } } }, { { { 132, 11419 },{ 130.8954319999999996, 11419 },{ 130, 11418.10449999999946 },{ 130, 11417 } } }, -- cgit v1.2.3