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> |
11 char SkTCoincident<TCurve, OppCurve>::dumpIsCoincidentStr() const { | |
12 if (!!fCoincident != fCoincident) { | |
13 return '?'; | |
14 } | |
15 return fCoincident ? '*' : 0; | |
16 } | |
17 | |
18 template<typename TCurve, typename OppCurve> | |
19 void SkTCoincident<TCurve, OppCurve>::dump() const { | 11 void SkTCoincident<TCurve, OppCurve>::dump() const { |
20 SkDebugf("t=%1.9g pt=(%1.9g,%1.9g)%s\n", fPerpT, fPerpPt.fX, fPerpPt.fY, | 12 SkDebugf("t=%1.9g pt=(%1.9g,%1.9g)%s\n", fPerpT, fPerpPt.fX, fPerpPt.fY, |
21 fCoincident ? " coincident" : ""); | 13 fCoincident ? " coincident" : ""); |
22 } | 14 } |
23 | 15 |
24 template<typename TCurve, typename OppCurve> | 16 template<typename TCurve, typename OppCurve> |
25 const SkTSpan<TCurve, OppCurve>* SkTSect<TCurve, OppCurve>::debugSpan(int id) co
nst { | 17 const SkTSpan<TCurve, OppCurve>* SkTSect<TCurve, OppCurve>::debugSpan(int id) co
nst { |
26 const SkTSpan<TCurve, OppCurve>* test = fHead; | 18 const SkTSpan<TCurve, OppCurve>* test = fHead; |
27 do { | 19 do { |
28 if (test->debugID() == id) { | 20 if (test->debugID() == id) { |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 void SkTSpan<TCurve, OppCurve>::dumpCoin() const { | 194 void SkTSpan<TCurve, OppCurve>::dumpCoin() const { |
203 dumpID(); | 195 dumpID(); |
204 SkDebugf(" coinStart "); | 196 SkDebugf(" coinStart "); |
205 fCoinStart.dump(); | 197 fCoinStart.dump(); |
206 SkDebugf(" coinEnd "); | 198 SkDebugf(" coinEnd "); |
207 fCoinEnd.dump(); | 199 fCoinEnd.dump(); |
208 } | 200 } |
209 | 201 |
210 template<typename TCurve, typename OppCurve> | 202 template<typename TCurve, typename OppCurve> |
211 void SkTSpan<TCurve, OppCurve>::dumpID() const { | 203 void SkTSpan<TCurve, OppCurve>::dumpID() const { |
212 char cS = fCoinStart.dumpIsCoincidentStr(); | 204 if (fCoinStart.isCoincident()) { |
213 if (cS) { | 205 SkDebugf("%c", '*'); |
214 SkDebugf("%c", cS); | |
215 } | 206 } |
216 SkDebugf("%d", debugID()); | 207 SkDebugf("%d", debugID()); |
217 char cE = fCoinEnd.dumpIsCoincidentStr(); | 208 if (fCoinEnd.isCoincident()) { |
218 if (cE) { | 209 SkDebugf("%c", '*'); |
219 SkDebugf("%c", cE); | |
220 } | 210 } |
221 } | 211 } |
OLD | NEW |