| Index: src/pathops/SkOpSpan.cpp
|
| diff --git a/src/pathops/SkOpSpan.cpp b/src/pathops/SkOpSpan.cpp
|
| index ae4771cffc01ee15cfe4ce65b5bea8d4cd7fdc29..f5a52099da4be84f9d9a71ce7cb37b48637eeccd 100755
|
| --- a/src/pathops/SkOpSpan.cpp
|
| +++ b/src/pathops/SkOpSpan.cpp
|
| @@ -13,10 +13,64 @@ bool SkOpPtT::alias() const {
|
| return this->span()->ptT() != this;
|
| }
|
|
|
| +bool SkOpPtT::contains(const SkOpPtT* check) const {
|
| + SkASSERT(this != check);
|
| + const SkOpPtT* ptT = this;
|
| + const SkOpPtT* stopPtT = ptT;
|
| + while ((ptT = ptT->next()) != stopPtT) {
|
| + if (ptT == check) {
|
| + return true;
|
| + }
|
| + }
|
| + return false;
|
| +}
|
| +
|
| +SkOpPtT* SkOpPtT::contains(const SkOpSegment* check) {
|
| + SkASSERT(this->segment() != check);
|
| + SkOpPtT* ptT = this;
|
| + const SkOpPtT* stopPtT = ptT;
|
| + while ((ptT = ptT->next()) != stopPtT) {
|
| + if (ptT->segment() == check) {
|
| + return ptT;
|
| + }
|
| + }
|
| + return NULL;
|
| +}
|
| +
|
| SkOpContour* SkOpPtT::contour() const {
|
| return segment()->contour();
|
| }
|
|
|
| +SkOpPtT* SkOpPtT::doppelganger() {
|
| + SkASSERT(fDeleted);
|
| + SkOpPtT* ptT = fNext;
|
| + while (ptT->fDeleted) {
|
| + ptT = ptT->fNext;
|
| + }
|
| + const SkOpPtT* stopPtT = ptT;
|
| + do {
|
| + if (ptT->fSpan == fSpan) {
|
| + return ptT;
|
| + }
|
| + ptT = ptT->fNext;
|
| + } while (stopPtT != ptT);
|
| + SkASSERT(0);
|
| + return NULL;
|
| +}
|
| +
|
| +SkOpPtT* SkOpPtT::find(SkOpSegment* segment) {
|
| + SkOpPtT* ptT = this;
|
| + const SkOpPtT* stopPtT = ptT;
|
| + do {
|
| + if (ptT->segment() == segment) {
|
| + return ptT;
|
| + }
|
| + ptT = ptT->fNext;
|
| + } while (stopPtT != ptT);
|
| + SkASSERT(0);
|
| + return NULL;
|
| +}
|
| +
|
| SkOpGlobalState* SkOpPtT::globalState() const {
|
| return contour()->globalState();
|
| }
|
|
|