When three or more edges are coincident, the logic needs
to compute the overlapping ranges and combine the winding
into a single destination.

This computes coincidence more rigorously, fixing the
edge cases exposed by this bug.

Also, add the ability to debug and dump pathop structures
from the coincident context.

TBR=reed@google.com
BUG=skia:3651

Review URL: https://codereview.chromium.org/1182493015
diff --git a/src/pathops/SkPathOpsDebug.h b/src/pathops/SkPathOpsDebug.h
index 61c2eca..ee2c291 100644
--- a/src/pathops/SkPathOpsDebug.h
+++ b/src/pathops/SkPathOpsDebug.h
@@ -95,6 +95,12 @@
     #define SkDEBUGCODE_(...) __VA_ARGS__  // temporary until SkDEBUGCODE is fixed
 #endif
 
+#if DEBUG_VALIDATE == 0
+    #define PATH_OPS_DEBUG_VALIDATE_PARAMS(...)
+#else
+    #define PATH_OPS_DEBUG_VALIDATE_PARAMS(...) , __VA_ARGS__
+#endif
+
 #if DEBUG_T_SECT == 0
     #define PATH_OPS_DEBUG_T_SECT_RELEASE(a, b) b
     #define PATH_OPS_DEBUG_T_SECT_PARAMS(...)
@@ -179,6 +185,12 @@
     static const class SkOpSegment* DebugContourSegment(class SkOpContour*, int id);
     static const class SkOpSpanBase* DebugContourSpan(class SkOpContour*, int id);
 
+    static const struct SkOpAngle* DebugCoincidenceAngle(class SkOpCoincidence*, int id);
+    static class SkOpContour* DebugCoincidenceContour(class SkOpCoincidence*, int id);
+    static const class SkOpPtT* DebugCoincidencePtT(class SkOpCoincidence*, int id);
+    static const class SkOpSegment* DebugCoincidenceSegment(class SkOpCoincidence*, int id);
+    static const class SkOpSpanBase* DebugCoincidenceSpan(class SkOpCoincidence*, int id);
+
     static const struct SkOpAngle* DebugPtTAngle(const class SkOpPtT*, int id);
     static class SkOpContour* DebugPtTContour(class SkOpPtT*, int id);
     static const class SkOpPtT* DebugPtTPtT(const class SkOpPtT*, int id);