| Index: src/pathops/SkPathOpsDebug.cpp
|
| diff --git a/src/pathops/SkPathOpsDebug.cpp b/src/pathops/SkPathOpsDebug.cpp
|
| index 5326addf8dd1a40dcba6ccdaf81a257ec6d3e7b0..18db448f59b3c95476fc2d9b67ad0efbebc9050d 100644
|
| --- a/src/pathops/SkPathOpsDebug.cpp
|
| +++ b/src/pathops/SkPathOpsDebug.cpp
|
| @@ -371,7 +371,7 @@ void SkPathOpsDebug::CheckHealth(SkOpContourHead* contourList, const char* id) {
|
| SkDebugf("\n");
|
| }
|
| contourList->globalState()->debugSetCheckHealth(false);
|
| -#if 0 && DEBUG_ACTIVE_SPANS
|
| +#if 01 && DEBUG_ACTIVE_SPANS
|
| SkDebugf("active after %s:\n", id);
|
| ShowActiveSpans(contourList);
|
| #endif
|
| @@ -1846,11 +1846,9 @@ void SkOpCoincidence::debugMarkCollapsed(const char* id, SkPathOpsDebug::GlitchL
|
| #endif
|
|
|
| void SkCoincidentSpans::debugShow() const {
|
| - SkDebugf("%s - id=%d t=%1.9g tEnd=%1.9g\n", __FUNCTION__,
|
| - coinPtTStart()->segment()->debugID(),
|
| + SkDebugf("coinSpan - id=%d t=%1.9g tEnd=%1.9g\n", coinPtTStart()->segment()->debugID(),
|
| coinPtTStart()->fT, coinPtTEnd()->fT);
|
| - SkDebugf("%s + id=%d t=%1.9g tEnd=%1.9g\n", __FUNCTION__,
|
| - oppPtTStart()->segment()->debugID(),
|
| + SkDebugf("coinSpan + id=%d t=%1.9g tEnd=%1.9g\n", oppPtTStart()->segment()->debugID(),
|
| oppPtTStart()->fT, oppPtTEnd()->fT);
|
| }
|
|
|
| @@ -1865,7 +1863,7 @@ void SkOpCoincidence::debugShowCoincidence() const {
|
| }
|
|
|
| #if DEBUG_COINCIDENCE
|
| -static void DebugValidate(const SkOpSpanBase* next, const SkOpSpanBase* end,
|
| +static void DebugCheckBetween(const SkOpSpanBase* next, const SkOpSpanBase* end,
|
| double oStart, double oEnd, const SkOpSegment* oSegment,
|
| const char* id, SkPathOpsDebug::GlitchLog* log) {
|
| SkASSERT(next != end);
|
| @@ -1986,10 +1984,29 @@ static void DebugValidate(const SkCoincidentSpans* head, const SkCoincidentSpans
|
| SkASSERT(coin->coinPtTEnd()->span()->ptT() == coin->coinPtTEnd());
|
| SkASSERT(coin->oppPtTStart()->span()->ptT() == coin->oppPtTStart());
|
| SkASSERT(coin->oppPtTEnd()->span()->ptT() == coin->oppPtTEnd());
|
| - DebugValidate(coin->coinPtTStart()->span(), coin->coinPtTEnd()->span(),
|
| + coin = coin->next();
|
| + }
|
| + DebugCheckOverlapTop(head, opt, id, log);
|
| +}
|
| +#endif
|
| +
|
| +void SkOpCoincidence::debugValidate() const {
|
| +#if DEBUG_COINCIDENCE
|
| + DebugValidate(fHead, fTop, nullptr, nullptr);
|
| + DebugValidate(fTop, nullptr, nullptr, nullptr);
|
| +#endif
|
| +}
|
| +
|
| +#if DEBUG_COINCIDENCE
|
| +static void DebugCheckBetween(const SkCoincidentSpans* head, const SkCoincidentSpans* opt,
|
| + const char* id, SkPathOpsDebug::GlitchLog* log) {
|
| + // look for pts inside coincident spans that are not inside the opposite spans
|
| + const SkCoincidentSpans* coin = head;
|
| + while (coin) {
|
| + DebugCheckBetween(coin->coinPtTStart()->span(), coin->coinPtTEnd()->span(),
|
| coin->oppPtTStart()->fT, coin->oppPtTEnd()->fT, coin->oppPtTStart()->segment(),
|
| id, log);
|
| - DebugValidate(coin->oppPtTStart()->span(), coin->oppPtTEnd()->span(),
|
| + DebugCheckBetween(coin->oppPtTStart()->span(), coin->oppPtTEnd()->span(),
|
| coin->coinPtTStart()->fT, coin->coinPtTEnd()->fT, coin->coinPtTStart()->segment(),
|
| id, log);
|
| coin = coin->next();
|
| @@ -1998,13 +2015,13 @@ static void DebugValidate(const SkCoincidentSpans* head, const SkCoincidentSpans
|
| }
|
| #endif
|
|
|
| -void SkOpCoincidence::debugValidate() const {
|
| +void SkOpCoincidence::debugCheckBetween() const {
|
| #if DEBUG_COINCIDENCE
|
| - // if (fGlobalState->debugCheckHealth()) {
|
| -// return;
|
| -// }
|
| - DebugValidate(fHead, fTop, nullptr, nullptr);
|
| - DebugValidate(fTop, nullptr, nullptr, nullptr);
|
| + if (fGlobalState->debugCheckHealth()) {
|
| + return;
|
| + }
|
| + DebugCheckBetween(fHead, fTop, nullptr, nullptr);
|
| + DebugCheckBetween(fTop, nullptr, nullptr, nullptr);
|
| #endif
|
| }
|
|
|
|
|