shape ops work in progress

Try to fix the 32 bit build by making some math
decisions more robust.

Rewrite the cubic intersection special case that 
detects if only end points are shared.

Rewrite the angle sort setup that computes whether
a cubic bends to the left or right.

git-svn-id: http://skia.googlecode.com/svn/trunk@8726 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/PathOpsOpTest.cpp b/tests/PathOpsOpTest.cpp
index 4d7c621..91a3615 100644
--- a/tests/PathOpsOpTest.cpp
+++ b/tests/PathOpsOpTest.cpp
@@ -1096,9 +1096,37 @@
     testPathOp(reporter, path, pathB, kDifference_PathOp);
 }
 
-static void (*firstTest)(skiatest::Reporter* ) = rectOp1d;
+static void cubicOp66u(skiatest::Reporter* reporter) {
+    SkPath path, pathB;
+    path.setFillType(SkPath::kWinding_FillType);
+    path.moveTo(0,1);
+    path.cubicTo(2,6, 4,2, 5,3);
+    path.close();
+    pathB.setFillType(SkPath::kWinding_FillType);
+    pathB.moveTo(2,4);
+    pathB.cubicTo(3,5, 1,0, 6,2);
+    pathB.close();
+    testPathOp(reporter, path, pathB, kUnion_PathOp);
+}
+
+static void cubicOp67u(skiatest::Reporter* reporter) {
+    SkPath path, pathB;
+    path.moveTo(3,5);
+    path.cubicTo(1,6, 5,0, 3,1);
+    path.lineTo(3,5);
+    path.close();
+    pathB.moveTo(0,5);
+    pathB.cubicTo(1,3, 5,3, 6,1);
+    pathB.lineTo(0,5);
+    pathB.close();
+    testPathOp(reporter, path, pathB, kUnion_PathOp);
+}
+
+static void (*firstTest)(skiatest::Reporter* ) = cubicOp1i;
 
 static struct TestDesc tests[] = {
+    TEST(cubicOp67u),
+    TEST(cubicOp66u),
     TEST(rectOp1d),
     TEST(cubicOp65d),
     TEST(cubicOp64d),