Mike R: please sanity check SkPostConfig.h
Mike K: please sanity check Test.cpp and skia_test.cpp

Feel free to look at the rest, but I don't expect any in depth review of path ops innards.

Path Ops first iteration used QuickSort to order segments radiating from an intersection to compute the winding rule.

This revision uses a circular sort instead. Breaking out the circular sort into its own long-lived structure (SkOpAngle) allows doing less work and provides a home for caching additional sorting data.

The circle sort is more stable than the former sort, has a robust ordering and fewer exceptions. It finds unsortable ordering less often. It is less reliant on the initial curve  tangent, using convex hulls instead whenever it can.

Additional debug validation makes sure that the computed structures are self-consistent. A new visualization tool helps verify that the angle ordering is correct.

The 70+M tests pass with this change on Windows, Mac, Linux 32 and Linux 64 in debug and release.

R=mtklein@google.com, reed@google.com

Author: caryclark@google.com

Review URL: https://codereview.chromium.org/131103009

git-svn-id: http://skia.googlecode.com/svn/trunk@14183 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/PathOpsQuadParameterizationTest.cpp b/tests/PathOpsQuadParameterizationTest.cpp
index 809243c..c7a2e87 100644
--- a/tests/PathOpsQuadParameterizationTest.cpp
+++ b/tests/PathOpsQuadParameterizationTest.cpp
@@ -24,22 +24,22 @@
     {{{0, 0}, {1, 0}, {1, 1}}},
 };
 
-static const size_t quadratics_count = SK_ARRAY_COUNT(quadratics);
+static const int quadratics_count = (int) SK_ARRAY_COUNT(quadratics);
 
 DEF_TEST(PathOpsQuadImplicit, reporter) {
     // split large quadratic
     // compare original, parts, to see if the are coincident
-    for (size_t index = 0; index < quadratics_count; ++index) {
+    for (int index = 0; index < quadratics_count; ++index) {
         const SkDQuad& test = quadratics[index];
         SkDQuadPair split = test.chopAt(0.5);
         SkDQuad midThird = test.subDivide(1.0/3, 2.0/3);
         const SkDQuad* quads[] = {
             &test, &midThird, &split.first(), &split.second()
         };
-        size_t quadsCount = SK_ARRAY_COUNT(quads);
-        for (size_t one = 0; one < quadsCount; ++one) {
-            for (size_t two = 0; two < quadsCount; ++two) {
-                for (size_t inner = 0; inner < 3; inner += 2) {
+        int quadsCount = (int) SK_ARRAY_COUNT(quads);
+        for (int one = 0; one < quadsCount; ++one) {
+            for (int two = 0; two < quadsCount; ++two) {
+                for (int inner = 0; inner < 3; inner += 2) {
                      REPORTER_ASSERT(reporter, point_on_parameterized_curve(*quads[one],
                             (*quads[two])[inner]));
                 }