aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pathops/SkPathOpsQuad.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pathops/SkPathOpsQuad.h')
-rw-r--r--src/pathops/SkPathOpsQuad.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/pathops/SkPathOpsQuad.h b/src/pathops/SkPathOpsQuad.h
index 32cfe58ecf..34740d6b1d 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