| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 #ifndef SkOpSpan_DEFINED | 7 #ifndef SkOpSpan_DEFINED |
| 8 #define SkOpSpan_DEFINED | 8 #define SkOpSpan_DEFINED |
| 9 | 9 |
| 10 #include "SkPathOpsDebug.h" | 10 #include "SkPathOpsDebug.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 bool collapsed(const SkOpPtT* ) const; | 51 bool collapsed(const SkOpPtT* ) const; |
| 52 bool contains(const SkOpPtT* ) const; | 52 bool contains(const SkOpPtT* ) const; |
| 53 SkOpPtT* contains(const SkOpSegment* ); | 53 SkOpPtT* contains(const SkOpSegment* ); |
| 54 SkOpContour* contour() const; | 54 SkOpContour* contour() const; |
| 55 | 55 |
| 56 int debugID() const { | 56 int debugID() const { |
| 57 return SkDEBUGRELEASE(fID, -1); | 57 return SkDEBUGRELEASE(fID, -1); |
| 58 } | 58 } |
| 59 | 59 |
| 60 const SkOpAngle* debugAngle(int id) const; | 60 const SkOpAngle* debugAngle(int id) const; |
| 61 bool debugContains(const SkOpPtT* ) const; |
| 62 const SkOpPtT* debugContains(const SkOpSegment* check) const; |
| 61 SkOpContour* debugContour(int id); | 63 SkOpContour* debugContour(int id); |
| 62 int debugLoopLimit(bool report) const; | 64 int debugLoopLimit(bool report) const; |
| 63 bool debugMatchID(int id) const; | 65 bool debugMatchID(int id) const; |
| 64 const SkOpPtT* debugPtT(int id) const; | 66 const SkOpPtT* debugPtT(int id) const; |
| 65 const SkOpSegment* debugSegment(int id) const; | 67 const SkOpSegment* debugSegment(int id) const; |
| 66 const SkOpSpanBase* debugSpan(int id) const; | 68 const SkOpSpanBase* debugSpan(int id) const; |
| 67 SkOpGlobalState* globalState() const; | |
| 68 void debugValidate() const; | 69 void debugValidate() const; |
| 69 | 70 |
| 70 bool deleted() const { | 71 bool deleted() const { |
| 71 return fDeleted; | 72 return fDeleted; |
| 72 } | 73 } |
| 73 | 74 |
| 74 SkOpPtT* doppelganger(); | 75 SkOpPtT* doppelganger(); |
| 75 | 76 |
| 76 bool duplicate() const { | 77 bool duplicate() const { |
| 77 return fDuplicatePt; | 78 return fDuplicatePt; |
| 78 } | 79 } |
| 79 | 80 |
| 80 void dump() const; // available to testing only | 81 void dump() const; // available to testing only |
| 81 void dumpAll() const; | 82 void dumpAll() const; |
| 82 void dumpBase() const; | 83 void dumpBase() const; |
| 83 | 84 |
| 84 SkOpPtT* find(SkOpSegment* ); | 85 SkOpPtT* find(SkOpSegment* ); |
| 86 SkOpGlobalState* globalState() const; |
| 85 void init(SkOpSpanBase* , double t, const SkPoint& , bool dup); | 87 void init(SkOpSpanBase* , double t, const SkPoint& , bool dup); |
| 86 | 88 |
| 87 void insert(SkOpPtT* span) { | 89 void insert(SkOpPtT* span) { |
| 88 SkASSERT(span != this); | 90 SkASSERT(span != this); |
| 89 span->fNext = fNext; | 91 span->fNext = fNext; |
| 90 fNext = span; | 92 fNext = span; |
| 91 } | 93 } |
| 92 | 94 |
| 93 const SkOpPtT* next() const { | 95 const SkOpPtT* next() const { |
| 94 return fNext; | 96 return fNext; |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 SkOpContour* contour() const; | 199 SkOpContour* contour() const; |
| 198 | 200 |
| 199 int debugBumpCount() { | 201 int debugBumpCount() { |
| 200 return SkDEBUGRELEASE(++fCount, -1); | 202 return SkDEBUGRELEASE(++fCount, -1); |
| 201 } | 203 } |
| 202 | 204 |
| 203 int debugID() const { | 205 int debugID() const { |
| 204 return SkDEBUGRELEASE(fID, -1); | 206 return SkDEBUGRELEASE(fID, -1); |
| 205 } | 207 } |
| 206 | 208 |
| 209 bool debugAlignedEnd(double t, const SkPoint& pt) const; |
| 210 bool debugAlignedInner() const; |
| 207 const SkOpAngle* debugAngle(int id) const; | 211 const SkOpAngle* debugAngle(int id) const; |
| 208 bool debugCoinEndLoopCheck() const; | 212 bool debugCoinEndLoopCheck() const; |
| 213 bool debugContains(const SkOpSegment* ) const; |
| 209 SkOpContour* debugContour(int id); | 214 SkOpContour* debugContour(int id); |
| 210 const SkOpPtT* debugPtT(int id) const; | 215 const SkOpPtT* debugPtT(int id) const; |
| 211 const SkOpSegment* debugSegment(int id) const; | 216 const SkOpSegment* debugSegment(int id) const; |
| 212 const SkOpSpanBase* debugSpan(int id) const; | 217 const SkOpSpanBase* debugSpan(int id) const; |
| 218 const SkOpSpan* debugStarter(SkOpSpanBase const** endPtr) const; |
| 213 SkOpGlobalState* globalState() const; | 219 SkOpGlobalState* globalState() const; |
| 214 void debugValidate() const; | 220 void debugValidate() const; |
| 215 | 221 |
| 216 bool deleted() const { | 222 bool deleted() const { |
| 217 return fPtT.deleted(); | 223 return fPtT.deleted(); |
| 218 } | 224 } |
| 219 | 225 |
| 220 void dump() const; // available to testing only | 226 void dump() const; // available to testing only |
| 221 void dumpCoin() const; | 227 void dumpCoin() const; |
| 222 void dumpAll() const; | 228 void dumpAll() const; |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 SkOpSpanBase* fNext; // next intersection point | 502 SkOpSpanBase* fNext; // next intersection point |
| 497 int fWindSum; // accumulated from contours surrounding this one. | 503 int fWindSum; // accumulated from contours surrounding this one. |
| 498 int fOppSum; // for binary operators: the opposite winding sum | 504 int fOppSum; // for binary operators: the opposite winding sum |
| 499 int fWindValue; // 0 == canceled; 1 == normal; >1 == coincident | 505 int fWindValue; // 0 == canceled; 1 == normal; >1 == coincident |
| 500 int fOppValue; // normally 0 -- when binary coincident edges combine, opp v
alue goes here | 506 int fOppValue; // normally 0 -- when binary coincident edges combine, opp v
alue goes here |
| 501 int fTopTTry; // specifies direction and t value to try next | 507 int fTopTTry; // specifies direction and t value to try next |
| 502 bool fDone; // if set, this span to next higher T has been processed | 508 bool fDone; // if set, this span to next higher T has been processed |
| 503 }; | 509 }; |
| 504 | 510 |
| 505 #endif | 511 #endif |
| OLD | NEW |