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 #include "SkFloatBits.h" | 7 #include "SkFloatBits.h" |
8 #include "SkOpCoincidence.h" | 8 #include "SkOpCoincidence.h" |
9 #include "SkPathOpsTypes.h" | 9 #include "SkPathOpsTypes.h" |
10 | 10 |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 if (approximately_zero_cubed(x)) { | 193 if (approximately_zero_cubed(x)) { |
194 return 0; | 194 return 0; |
195 } | 195 } |
196 double result = halley_cbrt3d(fabs(x)); | 196 double result = halley_cbrt3d(fabs(x)); |
197 if (x < 0) { | 197 if (x < 0) { |
198 result = -result; | 198 result = -result; |
199 } | 199 } |
200 return result; | 200 return result; |
201 } | 201 } |
202 | 202 |
203 SkOpGlobalState::SkOpGlobalState(SkOpCoincidence* coincidence, SkOpContourHead*
head) | 203 SkOpGlobalState::SkOpGlobalState(SkOpCoincidence* coincidence, SkOpContourHead*
head |
| 204 SkDEBUGPARAMS(const char* testName)) |
204 : fCoincidence(coincidence) | 205 : fCoincidence(coincidence) |
205 , fContourHead(head) | 206 , fContourHead(head) |
206 , fNested(0) | 207 , fNested(0) |
207 , fWindingFailed(false) | 208 , fWindingFailed(false) |
208 , fAngleCoincidence(false) | 209 , fAngleCoincidence(false) |
209 , fPhase(kIntersecting) | 210 , fPhase(kIntersecting) |
| 211 SkDEBUGPARAMS(fDebugTestName(testName)) |
210 SkDEBUGPARAMS(fAngleID(0)) | 212 SkDEBUGPARAMS(fAngleID(0)) |
211 SkDEBUGPARAMS(fContourID(0)) | 213 SkDEBUGPARAMS(fContourID(0)) |
212 SkDEBUGPARAMS(fPtTID(0)) | 214 SkDEBUGPARAMS(fPtTID(0)) |
213 SkDEBUGPARAMS(fSegmentID(0)) | 215 SkDEBUGPARAMS(fSegmentID(0)) |
214 SkDEBUGPARAMS(fSpanID(0)) { | 216 SkDEBUGPARAMS(fSpanID(0)) { |
215 if (coincidence) { | 217 if (coincidence) { |
216 coincidence->debugSetGlobalState(this); | 218 coincidence->debugSetGlobalState(this); |
217 } | 219 } |
218 } | 220 } |
219 | 221 |
OLD | NEW |