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

Unified Diff: src/pathops/SkDConicLineIntersection.cpp

Issue 2046713003: fix pathops fuzz bugs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix most vexing parse Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pathops/SkAddIntersections.cpp ('k') | src/pathops/SkIntersections.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkDConicLineIntersection.cpp
diff --git a/src/pathops/SkDConicLineIntersection.cpp b/src/pathops/SkDConicLineIntersection.cpp
index e6d775f76e1b17a62ceb3fcbf17affdfbcc68e44..2d906072fa549f79bca75a96a5323d234dd1df15 100644
--- a/src/pathops/SkDConicLineIntersection.cpp
+++ b/src/pathops/SkDConicLineIntersection.cpp
@@ -103,9 +103,14 @@ public:
for (int index = 0; index < roots; ++index) {
double conicT = rootVals[index];
double lineT = this->findLineT(conicT);
- SkDEBUGCODE(SkDPoint conicPt = fConic.ptAtT(conicT));
- SkDEBUGCODE(SkDPoint linePt = fLine->ptAtT(lineT));
- SkASSERT(conicPt.approximatelyEqual(linePt));
+#ifdef SK_DEBUG
+ if (!fIntersections->debugGlobalState()
+ || !fIntersections->debugGlobalState()->debugSkipAssert()) {
+ SkDEBUGCODE(SkDPoint conicPt = fConic.ptAtT(conicT));
+ SkDEBUGCODE(SkDPoint linePt = fLine->ptAtT(lineT));
+ SkASSERT(conicPt.approximatelyEqual(linePt));
+ }
+#endif
SkDPoint pt;
if (this->pinTs(&conicT, &lineT, &pt, kPointUninitialized)
&& this->uniqueAnswer(conicT, pt)) {
« no previous file with comments | « src/pathops/SkAddIntersections.cpp ('k') | src/pathops/SkIntersections.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698