pathops work in progress

BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12089 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/pathops/SkIntersectionHelper.h b/src/pathops/SkIntersectionHelper.h
index 1a4b1f0..f5eeaf8 100644
--- a/src/pathops/SkIntersectionHelper.h
+++ b/src/pathops/SkIntersectionHelper.h
@@ -7,6 +7,10 @@
 #include "SkOpContour.h"
 #include "SkPath.h"
 
+#if SK_DEBUG
+#include "SkPathOpsPoint.h"
+#endif
+
 class SkIntersectionHelper {
 public:
     enum SegmentType {
@@ -81,6 +85,14 @@
         return midPtByT.approximatelyEqual(midPtByAvg);
     }
 
+    bool isPartial(double t1, double t2, const SkDPoint& pt1, const SkDPoint& pt2) const {
+        const SkOpSegment& segment = fContour->segments()[fIndex];
+        double mid = (t1 + t2) / 2;
+        SkDPoint midPtByT = segment.dPtAtT(mid);
+        SkDPoint midPtByAvg = SkDPoint::Mid(pt1, pt2);
+        return midPtByT.approximatelyPEqual(midPtByAvg);
+    }
+
     SkScalar left() const {
         return bounds().fLeft;
     }
@@ -137,6 +149,19 @@
         return y() != pts()[0].fY;
     }
 
+#ifdef SK_DEBUG
+    void dump() {
+        SkDPoint::dump(pts()[0]);
+        SkDPoint::dump(pts()[1]);
+        if (verb() >= SkPath::kQuad_Verb) {
+            SkDPoint::dump(pts()[2]);
+        }
+        if (verb() >= SkPath::kCubic_Verb) {
+            SkDPoint::dump(pts()[3]);
+        }
+    }
+#endif
+
 private:
     SkOpContour* fContour;
     int fIndex;