Index: src/pathops/SkPathOpsTypes.h |
diff --git a/src/pathops/SkPathOpsTypes.h b/src/pathops/SkPathOpsTypes.h |
index 15a1b4b89b8e95be6ac2235cd3eec2930669494b..845288f60937db87ba28530ced00037619a0619a 100644 |
--- a/src/pathops/SkPathOpsTypes.h |
+++ b/src/pathops/SkPathOpsTypes.h |
@@ -24,17 +24,18 @@ enum SkPathOpsMask { |
class SkOpCoincidence; |
class SkOpContour; |
+class SkOpContourHead; |
class SkOpGlobalState { |
public: |
- SkOpGlobalState(SkOpCoincidence* coincidence SkDEBUGPARAMS(SkOpContour* head)) |
+ SkOpGlobalState(SkOpCoincidence* coincidence, SkOpContourHead* head) |
: fCoincidence(coincidence) |
+ , fContourHead(head) |
, fWindingFailed(false) |
, fAngleCoincidence(false) |
#if DEBUG_VALIDATE |
, fPhase(kIntersecting) |
#endif |
- SkDEBUGPARAMS(fHead(head)) |
SkDEBUGPARAMS(fAngleID(0)) |
SkDEBUGPARAMS(fContourID(0)) |
SkDEBUGPARAMS(fPtTID(0)) |
@@ -49,6 +50,10 @@ public: |
}; |
#endif |
+ enum { |
+ kMaxWindingTries = 10 |
+ }; |
+ |
bool angleCoincidence() { |
return fAngleCoincidence; |
} |
@@ -57,6 +62,10 @@ public: |
return fCoincidence; |
} |
+ SkOpContourHead* contourHead() { |
+ return fContourHead; |
+ } |
+ |
#ifdef SK_DEBUG |
const struct SkOpAngle* debugAngle(int id) const; |
SkOpContour* debugContour(int id); |
@@ -94,6 +103,10 @@ public: |
fAngleCoincidence = true; |
} |
+ void setContourHead(SkOpContourHead* contourHead) { |
+ fContourHead = contourHead; |
+ } |
+ |
#if DEBUG_VALIDATE |
void setPhase(Phase phase) { |
SkASSERT(fPhase != phase); |
@@ -112,13 +125,13 @@ public: |
private: |
SkOpCoincidence* fCoincidence; |
+ SkOpContourHead* fContourHead; |
bool fWindingFailed; |
bool fAngleCoincidence; |
#if DEBUG_VALIDATE |
Phase fPhase; |
#endif |
#ifdef SK_DEBUG |
- SkOpContour* fHead; |
int fAngleID; |
int fContourID; |
int fPtTID; |