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

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

Issue 2166813006: conic fuzz fix (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: set test to skip asserts Created 4 years, 5 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.h ('k') | tests/PathOpsOpTest.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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 int fDebugLoopCount[3]; 176 int fDebugLoopCount[3];
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 #define SkOPASSERT(cond) SkASSERT(this->globalState()->debugSkipAssert() || cond ) 187 #define SkOPASSERT(cond) SkASSERT(this->globalState()->debugSkipAssert() || cond )
187 #define SkOPOBJASSERT(obj, cond) SkASSERT((obj->debugGlobalState() && \ 188 #define SkOPOBJASSERT(obj, cond) SkASSERT((obj->debugGlobalState() && \
188 obj->debugGlobalState()->debugSkipAssert()) || cond) 189 obj->debugGlobalState()->debugSkipAssert()) || cond)
190 #else
191 #define SkOPASSERT(cond)
192 #define SkOPOBJASSERT(obj, cond)
193 #endif
189 194
190 // Use Almost Equal when comparing coordinates. Use epsilon to compare T values. 195 // Use Almost Equal when comparing coordinates. Use epsilon to compare T values.
191 bool AlmostEqualUlps(float a, float b); 196 bool AlmostEqualUlps(float a, float b);
192 inline bool AlmostEqualUlps(double a, double b) { 197 inline bool AlmostEqualUlps(double a, double b) {
193 return AlmostEqualUlps(SkDoubleToScalar(a), SkDoubleToScalar(b)); 198 return AlmostEqualUlps(SkDoubleToScalar(a), SkDoubleToScalar(b));
194 } 199 }
195 200
196 bool AlmostEqualUlpsNoNormalCheck(float a, float b); 201 bool AlmostEqualUlpsNoNormalCheck(float a, float b);
197 inline bool AlmostEqualUlpsNoNormalCheck(double a, double b) { 202 inline bool AlmostEqualUlpsNoNormalCheck(double a, double b) {
198 return AlmostEqualUlpsNoNormalCheck(SkDoubleToScalar(a), SkDoubleToScalar(b) ); 203 return AlmostEqualUlpsNoNormalCheck(SkDoubleToScalar(a), SkDoubleToScalar(b) );
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 */ 577 */
573 inline int SkDSideBit(double x) { 578 inline int SkDSideBit(double x) {
574 return 1 << SKDSide(x); 579 return 1 << SKDSide(x);
575 } 580 }
576 581
577 inline double SkPinT(double t) { 582 inline double SkPinT(double t) {
578 return precisely_less_than_zero(t) ? 0 : precisely_greater_than_one(t) ? 1 : t; 583 return precisely_less_than_zero(t) ? 0 : precisely_greater_than_one(t) ? 1 : t;
579 } 584 }
580 585
581 #endif 586 #endif
OLDNEW
« no previous file with comments | « src/pathops/SkPathOpsTSect.h ('k') | tests/PathOpsOpTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698