shape ops work in progress
Review URL: https://codereview.appspot.com/6392058

git-svn-id: http://skia.googlecode.com/svn/trunk@4591 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/experimental/Intersection/Simplify.cpp b/experimental/Intersection/Simplify.cpp
index 8cdec8f..859755f 100644
--- a/experimental/Intersection/Simplify.cpp
+++ b/experimental/Intersection/Simplify.cpp
@@ -1157,9 +1157,10 @@
     // it is guaranteed to have an end which describes a non-zero length (?)
     // winding -1 means ccw, 1 means cw
     // firstFind allows coincident edges to be treated differently
-    Segment* findNext(SkTDArray<Span*>& chase, int winding, const int startIndex,
-            const int endIndex,
-            int& nextStart, int& nextEnd, int& flipped, bool firstFind) {
+    Segment* findNext(SkTDArray<Span*>& chase, int winding,
+            const int startIndex, const int endIndex,
+            int& nextStart, int& nextEnd, int& flipped, bool firstFind
+            ,bool active /* active param is debugging only */ ) {
         SkASSERT(startIndex != endIndex);
         int count = fTs.count();
         SkASSERT(startIndex < endIndex ? startIndex < count - 1
@@ -1217,11 +1218,14 @@
             }
             firstEdge = false;
             if (!winding) {
+                if (!active) {
+                    SkASSERT(nextAngle->segment() == this);
+                    markWinding(SkMin32(nextAngle->start(), nextAngle->end()),
+                                maxWinding);
+                    SkDebugf("%s inactive\n", __FUNCTION__);
+                    return NULL;
+                }
                 if (!foundAngle) {
-#if 0
-                    nextAngle->segment()->markWinding(
-                        SkMin32(nextAngle->start(), nextAngle->end()), maxWinding);
-#endif
                     foundAngle = nextAngle;
                 }
                 continue;
@@ -2941,7 +2945,8 @@
                 int nextStart, nextEnd, flipped = 1;
                 Segment* next = current->findNext(chaseArray, 
                         winding + spanWinding, index,
-                        endIndex, nextStart, nextEnd, flipped, firstTime);
+                        endIndex, nextStart, nextEnd, flipped, firstTime
+                        , active /* active is debugging only */ );
                 if (!next) {
                     break;
                 }