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

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

Issue 2185703002: fix fuzz bugs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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') | tests/PathOpsDebug.cpp » ('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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « src/pathops/SkPathOpsTSect.cpp ('k') | tests/PathOpsDebug.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698