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

Unified Diff: src/pathops/SkPathOpsQuad.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pathops/SkPathOpsDebug.cpp ('k') | src/pathops/SkPathOpsRect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkPathOpsQuad.h
diff --git a/src/pathops/SkPathOpsQuad.h b/src/pathops/SkPathOpsQuad.h
index 32cfe58ecf81d6e960dd485fed6fa2e00412a2a0..34740d6b1dee02dfb9523f43e846bad3cad457ed 100644
--- a/src/pathops/SkPathOpsQuad.h
+++ b/src/pathops/SkPathOpsQuad.h
@@ -40,17 +40,21 @@ struct SkDQuad {
sk_bzero(fPts, sizeof(fPts));
}
+ void debugSet(const SkDPoint* pts);
+
SkDQuad flip() const {
- SkDQuad result = {{fPts[2], fPts[1], fPts[0]}};
+ SkDQuad result = {{fPts[2], fPts[1], fPts[0]} SkDEBUGPARAMS(fDebugGlobalState) };
return result;
}
static bool IsConic() { return false; }
- const SkDQuad& set(const SkPoint pts[kPointCount]) {
+ const SkDQuad& set(const SkPoint pts[kPointCount]
+ SkDEBUGPARAMS(SkOpGlobalState* state = nullptr)) {
fPts[0] = pts[0];
fPts[1] = pts[1];
fPts[2] = pts[2];
+ SkDEBUGCODE(fDebugGlobalState = state);
return *this;
}
@@ -63,6 +67,10 @@ struct SkDQuad {
SkDVector dxdyAtT(double t) const;
static int FindExtrema(const double src[], double tValue[1]);
+#ifdef SK_DEBUG
+ SkOpGlobalState* globalState() const { return fDebugGlobalState; }
+#endif
+
/**
* Return the number of valid roots (0 < root < 1) for this cubic intersecting the
* specified horizontal line.
@@ -106,8 +114,7 @@ struct SkDQuad {
void dumpID(int id) const;
void dumpInner() const;
-private:
-// static double Tangent(const double* quadratic, double t); // uncalled
+ SkDEBUGCODE(SkOpGlobalState* fDebugGlobalState);
};
#endif
« no previous file with comments | « src/pathops/SkPathOpsDebug.cpp ('k') | src/pathops/SkPathOpsRect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698