| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright 2014 Google Inc. | 2  * Copyright 2014 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 | 7 | 
| 8 #include "SkPathOpsTSect.h" | 8 #include "SkPathOpsTSect.h" | 
| 9 | 9 | 
| 10 template<typename TCurve, typename OppCurve> | 10 template<typename TCurve, typename OppCurve> | 
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 76 void SkTSect<TCurve, OppCurve>::dumpBounded(int id) const { | 76 void SkTSect<TCurve, OppCurve>::dumpBounded(int id) const { | 
| 77     const SkTSpan<TCurve, OppCurve>* bounded = debugSpan(id); | 77     const SkTSpan<TCurve, OppCurve>* bounded = debugSpan(id); | 
| 78     if (!bounded) { | 78     if (!bounded) { | 
| 79         SkDebugf("no span matches %d\n", id); | 79         SkDebugf("no span matches %d\n", id); | 
| 80         return; | 80         return; | 
| 81     } | 81     } | 
| 82     const SkTSpan<OppCurve, TCurve>* test = bounded->debugOpp()->fHead; | 82     const SkTSpan<OppCurve, TCurve>* test = bounded->debugOpp()->fHead; | 
| 83     do { | 83     do { | 
| 84         if (test->findOppSpan(bounded)) { | 84         if (test->findOppSpan(bounded)) { | 
| 85             test->dump(); | 85             test->dump(); | 
|  | 86             SkDebugf(" "); | 
| 86         } | 87         } | 
| 87     } while ((test = test->next())); | 88     } while ((test = test->next())); | 
|  | 89     SkDebugf("\n"); | 
| 88 } | 90 } | 
| 89 | 91 | 
| 90 template<typename TCurve, typename OppCurve> | 92 template<typename TCurve, typename OppCurve> | 
| 91 void SkTSect<TCurve, OppCurve>::dumpBounds() const { | 93 void SkTSect<TCurve, OppCurve>::dumpBounds() const { | 
| 92     const SkTSpan<TCurve, OppCurve>* test = fHead; | 94     const SkTSpan<TCurve, OppCurve>* test = fHead; | 
| 93     do { | 95     do { | 
| 94         test->dumpBounds(); | 96         test->dumpBounds(); | 
| 95     } while ((test = test->next())); | 97     } while ((test = test->next())); | 
| 96 } | 98 } | 
| 97 | 99 | 
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 134 const SkTSpan<TCurve, OppCurve>* SkTSpan<TCurve, OppCurve>::debugSpan(int id) co
     nst { | 136 const SkTSpan<TCurve, OppCurve>* SkTSpan<TCurve, OppCurve>::debugSpan(int id) co
     nst { | 
| 135     return SkDEBUGRELEASE(fDebugSect->debugSpan(id), nullptr); | 137     return SkDEBUGRELEASE(fDebugSect->debugSpan(id), nullptr); | 
| 136 } | 138 } | 
| 137 | 139 | 
| 138 template<typename TCurve, typename OppCurve> | 140 template<typename TCurve, typename OppCurve> | 
| 139 const SkTSpan<TCurve, OppCurve>* SkTSpan<TCurve, OppCurve>::debugT(double t) con
     st { | 141 const SkTSpan<TCurve, OppCurve>* SkTSpan<TCurve, OppCurve>::debugT(double t) con
     st { | 
| 140     return SkDEBUGRELEASE(fDebugSect->debugT(t), nullptr); | 142     return SkDEBUGRELEASE(fDebugSect->debugT(t), nullptr); | 
| 141 } | 143 } | 
| 142 | 144 | 
| 143 template<typename TCurve, typename OppCurve> | 145 template<typename TCurve, typename OppCurve> | 
|  | 146 void SkTSpan<TCurve, OppCurve>::dumpAll() const { | 
|  | 147     dumpID(); | 
|  | 148     SkDebugf("=(%g,%g) [", fStartT, fEndT); | 
|  | 149     const SkTSpanBounded<OppCurve, TCurve>* testBounded = fBounded; | 
|  | 150     while (testBounded) { | 
|  | 151         const SkTSpan<OppCurve, TCurve>* span = testBounded->fBounded; | 
|  | 152         const SkTSpanBounded<OppCurve, TCurve>* next = testBounded->fNext; | 
|  | 153         span->dumpID(); | 
|  | 154         SkDebugf("=(%g,%g)", span->fStartT, span->fEndT); | 
|  | 155         if (next) { | 
|  | 156             SkDebugf(" "); | 
|  | 157         } | 
|  | 158         testBounded = next; | 
|  | 159     } | 
|  | 160     SkDebugf("]\n"); | 
|  | 161 } | 
|  | 162 | 
|  | 163 template<typename TCurve, typename OppCurve> | 
| 144 void SkTSpan<TCurve, OppCurve>::dump() const { | 164 void SkTSpan<TCurve, OppCurve>::dump() const { | 
| 145     dumpID(); | 165     dumpID(); | 
| 146     SkDebugf("=(%g,%g) [", fStartT, fEndT); | 166     SkDebugf("=(%g,%g) [", fStartT, fEndT); | 
| 147     const SkTSpanBounded<OppCurve, TCurve>* testBounded = fBounded; | 167     const SkTSpanBounded<OppCurve, TCurve>* testBounded = fBounded; | 
| 148     while (testBounded) { | 168     while (testBounded) { | 
| 149         const SkTSpan<OppCurve, TCurve>* span = testBounded->fBounded; | 169         const SkTSpan<OppCurve, TCurve>* span = testBounded->fBounded; | 
| 150         const SkTSpanBounded<OppCurve, TCurve>* next = testBounded->fNext; | 170         const SkTSpanBounded<OppCurve, TCurve>* next = testBounded->fNext; | 
| 151         span->dumpID(); | 171         span->dumpID(); | 
| 152         if (next) { | 172         if (next) { | 
| 153             SkDebugf(","); | 173             SkDebugf(","); | 
| (...skipping 28 matching lines...) Expand all  Loading... | 
| 182 template<typename TCurve, typename OppCurve> | 202 template<typename TCurve, typename OppCurve> | 
| 183 void SkTSpan<TCurve, OppCurve>::dumpID() const { | 203 void SkTSpan<TCurve, OppCurve>::dumpID() const { | 
| 184     if (fCoinStart.isCoincident()) { | 204     if (fCoinStart.isCoincident()) { | 
| 185         SkDebugf("%c", '*'); | 205         SkDebugf("%c", '*'); | 
| 186     } | 206     } | 
| 187     SkDebugf("%d", debugID()); | 207     SkDebugf("%d", debugID()); | 
| 188     if (fCoinEnd.isCoincident()) { | 208     if (fCoinEnd.isCoincident()) { | 
| 189         SkDebugf("%c", '*'); | 209         SkDebugf("%c", '*'); | 
| 190     } | 210     } | 
| 191 } | 211 } | 
| OLD | NEW | 
|---|