aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pathops/SkPathOpsOp.cpp
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2016-06-28 09:23:57 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-06-28 09:23:57 -0700
commit3f0753d3eccece8ac7f02f6af36d66a96c3dfb26 (patch)
treea7dca73764a07182471f1c69de159d92059ee9bf /src/pathops/SkPathOpsOp.cpp
parent74139f1b49d02b38006170c3e50439c1b33b175f (diff)
fix fuzz bugs
Detect more places where the pathops numerics cause numbers to become nearly identical and subsequently fail. These tests have extreme inputs and cannot succeed. Also remove the expectSuccess parameter from PathOpsDebug and check instead in the test framework. R=mbarbella@chromium.org TBR=reed@google.com BUG=623072,623022 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2103513002 Review-Url: https://codereview.chromium.org/2103513002
Diffstat (limited to 'src/pathops/SkPathOpsOp.cpp')
-rw-r--r--src/pathops/SkPathOpsOp.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pathops/SkPathOpsOp.cpp b/src/pathops/SkPathOpsOp.cpp
index b71ca9e481..25795047c8 100644
--- a/src/pathops/SkPathOpsOp.cpp
+++ b/src/pathops/SkPathOpsOp.cpp
@@ -245,8 +245,8 @@ extern void (*gVerboseFinalize)();
#endif
-bool OpDebug(const SkPath& one, const SkPath& two, SkPathOp op, SkPath* result,
- bool expectSuccess SkDEBUGPARAMS(bool skipAssert) SkDEBUGPARAMS(const char* testName)) {
+bool OpDebug(const SkPath& one, const SkPath& two, SkPathOp op, SkPath* result
+ SkDEBUGPARAMS(bool skipAssert) SkDEBUGPARAMS(const char* testName)) {
SkChunkAlloc allocator(4096); // FIXME: add a constant expression here, tune
SkOpContour contour;
SkOpContourHead* contourList = static_cast<SkOpContourHead*>(&contour);
@@ -413,7 +413,7 @@ static int debug_paths_draw_the_same(const SkPath& one, const SkPath& two, SkBit
bool Op(const SkPath& one, const SkPath& two, SkPathOp op, SkPath* result) {
#if DEBUG_VERIFY
- if (!OpDebug(one, two, op, result, true SkDEBUGPARAMS(nullptr))) {
+ if (!OpDebug(one, two, op, result SkDEBUGPARAMS(nullptr))) {
SkDebugf("%s did not expect failure\none: fill=%d\n", __FUNCTION__, one.getFillType());
one.dumpHex();
SkDebugf("two: fill=%d\n", two.getFillType());
@@ -455,6 +455,6 @@ bool Op(const SkPath& one, const SkPath& two, SkPathOp op, SkPath* result) {
}
return true;
#else
- return OpDebug(one, two, op, result, true SkDEBUGPARAMS(false) SkDEBUGPARAMS(nullptr));
+ return OpDebug(one, two, op, result SkDEBUGPARAMS(false) SkDEBUGPARAMS(nullptr));
#endif
}