split tight quads and conics

Tight quads and conics may nearly fold over on themselves, confusing
coincidence against other curves. Split them at their max curvature
early on to avoid complicating later logic.

TBR=reed@google.com
BUG=skia:5131
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2357353002

Review-Url: https://codereview.chromium.org/2357353002
diff --git a/tests/PathOpsOpTest.cpp b/tests/PathOpsOpTest.cpp
index 8ff0079..9bb3a0f 100644
--- a/tests/PathOpsOpTest.cpp
+++ b/tests/PathOpsOpTest.cpp
@@ -5375,6 +5375,26 @@
     testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
 }
 
+static void loop17(skiatest::Reporter* reporter, const char* filename) {
+    SkPath path, pathB;
+    path.moveTo(1, 2);
+    path.cubicTo(0, 3, -0.333333343f, 3.33333325f, 0.833333373f, 3.5f);
+    path.close();
+    pathB.moveTo(0, 3);
+    pathB.cubicTo(-0.333333343f, 3.33333325f, 0.833333373f, 3.5f, 1, 2);
+    pathB.close();
+    testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
+}
+
+static void circlesOp4(skiatest::Reporter* reporter, const char* filename) {
+    SkPath path, pathB;
+    path.setFillType(SkPath::kWinding_FillType);
+    path.addCircle(0, 1, 5, SkPath::kCW_Direction);
+    pathB.setFillType(SkPath::kWinding_FillType);
+    pathB.addCircle(0, 1, 0, SkPath::kCW_Direction);
+    testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
+}
+
 static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0;
 static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0;
 static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0;
@@ -5382,6 +5402,8 @@
 #define TEST(name) { name, #name }
 
 static struct TestDesc tests[] = {
+    TEST(circlesOp4),
+    TEST(loop17),
     TEST(cubicOp158),
     TEST(loops_i1),
     TEST(loops_i2),