Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/pathops/SkPathOpsTypes.h

Issue 2426173002: fix fuzzers (Closed)
Patch Set: fix dm Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/pathops/SkPathOpsTSect.cpp ('k') | src/pathops/SkPathWriter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 214
215 #ifdef SK_DEBUG 215 #ifdef SK_DEBUG
216 #if DEBUG_COINCIDENCE 216 #if DEBUG_COINCIDENCE
217 #define SkOPASSERT(cond) SkASSERT((this->globalState() && \ 217 #define SkOPASSERT(cond) SkASSERT((this->globalState() && \
218 (this->globalState()->debugCheckHealth() || \ 218 (this->globalState()->debugCheckHealth() || \
219 this->globalState()->debugSkipAssert())) || (cond)) 219 this->globalState()->debugSkipAssert())) || (cond))
220 #else 220 #else
221 #define SkOPASSERT(cond) SkASSERT((this->globalState() && \ 221 #define SkOPASSERT(cond) SkASSERT((this->globalState() && \
222 this->globalState()->debugSkipAssert()) || (cond)) 222 this->globalState()->debugSkipAssert()) || (cond))
223 #endif 223 #endif
224 #define SkOPOBJASSERT(obj, cond) SkASSERT((obj->debugGlobalState() && \ 224 #define SkOPOBJASSERT(obj, cond) SkASSERT((obj->globalState() && \
225 obj->debugGlobalState()->debugSkipAssert()) || (cond)) 225 obj->globalState()->debugSkipAssert()) || (cond))
226 #else 226 #else
227 #define SkOPASSERT(cond) 227 #define SkOPASSERT(cond)
228 #define SkOPOBJASSERT(obj, cond) 228 #define SkOPOBJASSERT(obj, cond)
229 #endif 229 #endif
230 230
231 // Use Almost Equal when comparing coordinates. Use epsilon to compare T values. 231 // Use Almost Equal when comparing coordinates. Use epsilon to compare T values.
232 bool AlmostEqualUlps(float a, float b); 232 bool AlmostEqualUlps(float a, float b);
233 inline bool AlmostEqualUlps(double a, double b) { 233 inline bool AlmostEqualUlps(double a, double b) {
234 return AlmostEqualUlps(SkDoubleToScalar(a), SkDoubleToScalar(b)); 234 return AlmostEqualUlps(SkDoubleToScalar(a), SkDoubleToScalar(b));
235 } 235 }
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 */ 609 */
610 inline int SkDSideBit(double x) { 610 inline int SkDSideBit(double x) {
611 return 1 << SKDSide(x); 611 return 1 << SKDSide(x);
612 } 612 }
613 613
614 inline double SkPinT(double t) { 614 inline double SkPinT(double t) {
615 return precisely_less_than_zero(t) ? 0 : precisely_greater_than_one(t) ? 1 : t; 615 return precisely_less_than_zero(t) ? 0 : precisely_greater_than_one(t) ? 1 : t;
616 } 616 }
617 617
618 #endif 618 #endif
OLDNEW
« no previous file with comments | « src/pathops/SkPathOpsTSect.cpp ('k') | src/pathops/SkPathWriter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698