shape ops work in progress
refined line/quad intersection, made more robust
still working on edge cases
git-svn-id: http://skia.googlecode.com/svn/trunk@6017 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/experimental/Intersection/ShapeOps.cpp b/experimental/Intersection/ShapeOps.cpp
index f33c8b1..4785e86 100644
--- a/experimental/Intersection/ShapeOps.cpp
+++ b/experimental/Intersection/ShapeOps.cpp
@@ -20,6 +20,8 @@
const int aXorMask, const int bXorMask, SkPath& simple) {
bool firstContour = true;
do {
+
+#if SORTABLE_CONTOURS // old way
Segment* topStart = findTopContour(contourList);
if (!topStart) {
break;
@@ -28,6 +30,13 @@
// follow edges to intersection by changing the index by direction.
int index, endIndex;
Segment* current = topStart->findTop(index, endIndex);
+#else // new way: iterate while top is unsortable
+ int index, endIndex;
+ Segment* current = findSortableTop(contourList, index, endIndex);
+ if (!current) {
+ break;
+ }
+#endif
int contourWinding;
if (firstContour) {
contourWinding = 0;