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

Unified Diff: src/pathops/SkIntersections.h

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/SkDConicLineIntersection.cpp ('k') | src/pathops/SkOpBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkIntersections.h
diff --git a/src/pathops/SkIntersections.h b/src/pathops/SkIntersections.h
index b733ed0ea7f654847fbe6b3629c02af886d36858..474142b269607f2a4b102e0fa88f9f5fe617ae2a 100644
--- a/src/pathops/SkIntersections.h
+++ b/src/pathops/SkIntersections.h
@@ -15,9 +15,10 @@
class SkIntersections {
public:
- SkIntersections()
+ SkIntersections(SkDEBUGCODE(SkOpGlobalState* globalState = nullptr))
: fSwap(0)
#ifdef SK_DEBUG
+ SkDEBUGPARAMS(fDebugGlobalState(globalState))
, fDepth(0)
#endif
{
@@ -102,6 +103,10 @@ public:
return intersect(cubic, line);
}
+#ifdef SK_DEBUG
+ SkOpGlobalState* debugGlobalState() { return fDebugGlobalState; }
+#endif
+
bool hasT(double t) const {
SkASSERT(t == 0 || t == 1);
return fUsed > 0 && (t == 0 ? fT[0][0] == 0 : fT[0][fUsed - 1] == 1);
@@ -309,6 +314,7 @@ private:
bool fAllowNear;
bool fSwap;
#ifdef SK_DEBUG
+ SkOpGlobalState* fDebugGlobalState;
int fDepth;
#endif
#if DEBUG_T_SECT_LOOP_COUNT
« no previous file with comments | « src/pathops/SkDConicLineIntersection.cpp ('k') | src/pathops/SkOpBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698