Index: src/pathops/SkPathOpsSimplify.cpp |
diff --git a/src/pathops/SkPathOpsSimplify.cpp b/src/pathops/SkPathOpsSimplify.cpp |
index f9f8f5c71ea6d042fa7e1a471ba813c6188a1b82..d587c3bbbb9244a1f1c3d00c26e5b31e134a747f 100644 |
--- a/src/pathops/SkPathOpsSimplify.cpp |
+++ b/src/pathops/SkPathOpsSimplify.cpp |
@@ -158,6 +158,11 @@ bool SimplifyDebug(const SkPath& path, SkPath* result |
SkOpGlobalState globalState(contourList, &allocator |
SkDEBUGPARAMS(skipAssert) SkDEBUGPARAMS(testName)); |
SkOpCoincidence coincidence(&globalState); |
+#ifdef SK_DEBUG |
+ if (SkPathOpsDebug::gDumpOp) { |
+ SkPathOpsDebug::DumpSimplify(path, testName); |
+ } |
+#endif |
SkScalar scaleFactor = ScaleFactor(path); |
SkPath scaledPath; |
const SkPath* workingPath; |
@@ -218,5 +223,15 @@ bool SimplifyDebug(const SkPath& path, SkPath* result |
} |
bool Simplify(const SkPath& path, SkPath* result) { |
+#ifdef SK_DEBUG |
+ if (SkPathOpsDebug::gVerifyOp) { |
+ if (!SimplifyDebug(path, result SkDEBUGPARAMS(false) SkDEBUGPARAMS(nullptr))) { |
+ SkPathOpsDebug::ReportSimplifyFail(path); |
+ return false; |
+ } |
+ SkPathOpsDebug::VerifySimplify(path, *result); |
+ return true; |
+ } |
+#endif |
return SimplifyDebug(path, result SkDEBUGPARAMS(true) SkDEBUGPARAMS(nullptr)); |
} |