summaryrefslogtreecommitdiff
path: root/pathops/SkPathOpsDebug.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pathops/SkPathOpsDebug.cpp')
-rw-r--r--pathops/SkPathOpsDebug.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/pathops/SkPathOpsDebug.cpp b/pathops/SkPathOpsDebug.cpp
index 4e421631..1f2b0133 100644
--- a/pathops/SkPathOpsDebug.cpp
+++ b/pathops/SkPathOpsDebug.cpp
@@ -10,12 +10,12 @@
#if defined SK_DEBUG || !FORCE_RELEASE
-int SkPathOpsDebug::gMaxWindSum = SK_MaxS32;
-int SkPathOpsDebug::gMaxWindValue = SK_MaxS32;
-
const char* SkPathOpsDebug::kLVerbStr[] = {"", "line", "quad", "cubic"};
-int SkPathOpsDebug::gContourID;
-int SkPathOpsDebug::gSegmentID;
+
+#if defined(SK_DEBUG) || !FORCE_RELEASE
+int SkPathOpsDebug::gContourID = 0;
+int SkPathOpsDebug::gSegmentID = 0;
+#endif
#if DEBUG_SORT || DEBUG_SWAP_TOP
int SkPathOpsDebug::gSortCountDefault = SK_MaxS32;
@@ -393,6 +393,17 @@ bool SkOpSegment::debugContains(const SkOpAngle* angle) const {
}
#endif
+#if DEBUG_SWAP_TOP
+int SkOpSegment::debugInflections(int tStart, int tEnd) const {
+ if (fVerb != SkPath::kCubic_Verb) {
+ return false;
+ }
+ SkDCubic dst = SkDCubic::SubDivide(fPts, fTs[tStart].fT, fTs[tEnd].fT);
+ double inflections[2];
+ return dst.findInflections(inflections);
+}
+#endif
+
void SkOpSegment::debugReset() {
fTs.reset();
fAngles.reset();