| 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 #ifndef SkPathOpsTypes_DEFINED | 7 #ifndef SkPathOpsTypes_DEFINED |
| 8 #define SkPathOpsTypes_DEFINED | 8 #define SkPathOpsTypes_DEFINED |
| 9 | 9 |
| 10 #include <float.h> // for FLT_EPSILON | 10 #include <float.h> // for FLT_EPSILON |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 SkPath::Verb fDebugWorstVerb[6]; | 177 SkPath::Verb fDebugWorstVerb[6]; |
| 178 SkPoint fDebugWorstPts[24]; | 178 SkPoint fDebugWorstPts[24]; |
| 179 float fDebugWorstWeight[6]; | 179 float fDebugWorstWeight[6]; |
| 180 #endif | 180 #endif |
| 181 #if DEBUG_COINCIDENCE | 181 #if DEBUG_COINCIDENCE |
| 182 bool fDebugCheckHealth; | 182 bool fDebugCheckHealth; |
| 183 #endif | 183 #endif |
| 184 }; | 184 }; |
| 185 | 185 |
| 186 #ifdef SK_DEBUG | 186 #ifdef SK_DEBUG |
| 187 #define SkOPASSERT(cond) SkASSERT(this->globalState()->debugSkipAssert() || cond
) | 187 #define SkOPASSERT(cond) SkASSERT((this->globalState() && \ |
| 188 this->globalState()->debugSkipAssert()) || cond) |
| 188 #define SkOPOBJASSERT(obj, cond) SkASSERT((obj->debugGlobalState() && \ | 189 #define SkOPOBJASSERT(obj, cond) SkASSERT((obj->debugGlobalState() && \ |
| 189 obj->debugGlobalState()->debugSkipAssert()) || cond) | 190 obj->debugGlobalState()->debugSkipAssert()) || cond) |
| 190 #else | 191 #else |
| 191 #define SkOPASSERT(cond) | 192 #define SkOPASSERT(cond) |
| 192 #define SkOPOBJASSERT(obj, cond) | 193 #define SkOPOBJASSERT(obj, cond) |
| 193 #endif | 194 #endif |
| 194 | 195 |
| 195 // Use Almost Equal when comparing coordinates. Use epsilon to compare T values. | 196 // Use Almost Equal when comparing coordinates. Use epsilon to compare T values. |
| 196 bool AlmostEqualUlps(float a, float b); | 197 bool AlmostEqualUlps(float a, float b); |
| 197 inline bool AlmostEqualUlps(double a, double b) { | 198 inline bool AlmostEqualUlps(double a, double b) { |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 */ | 578 */ |
| 578 inline int SkDSideBit(double x) { | 579 inline int SkDSideBit(double x) { |
| 579 return 1 << SKDSide(x); | 580 return 1 << SKDSide(x); |
| 580 } | 581 } |
| 581 | 582 |
| 582 inline double SkPinT(double t) { | 583 inline double SkPinT(double t) { |
| 583 return precisely_less_than_zero(t) ? 0 : precisely_greater_than_one(t) ? 1 :
t; | 584 return precisely_less_than_zero(t) ? 0 : precisely_greater_than_one(t) ? 1 :
t; |
| 584 } | 585 } |
| 585 | 586 |
| 586 #endif | 587 #endif |
| OLD | NEW |