aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pathops/SkOpCoincidence.cpp
diff options
context:
space:
mode:
authorGravatar Cary Clark <caryclark@skia.org>2018-03-19 09:42:00 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-19 14:06:25 +0000
commit0949beeaf440bc0022703951741f8a6abf379d88 (patch)
tree7464e828b4e1b56b8544773c199997cdeff41785 /src/pathops/SkOpCoincidence.cpp
parent8d2ba44c9cba790cfd8ace80de9e15972bccbe5d (diff)
fix op fuzz
fixes the current four fuzzer fails by rewriting asserts as function exits. Passes all extended pathops testing. To run the extended tests: ./out/debug/pathops_unittest -V -x ./out/release/pathops_unittest -V -x R=kjlubick@google.com Docs-Preview: https://skia.org/?cl=114962 Bug: skia: Change-Id: I05bd368a87b38b1121403cf93b21caf76c2e7d7e Reviewed-on: https://skia-review.googlesource.com/114962 Commit-Queue: Cary Clark <caryclark@skia.org> Reviewed-by: Kevin Lubick <kjlubick@google.com>
Diffstat (limited to 'src/pathops/SkOpCoincidence.cpp')
-rw-r--r--src/pathops/SkOpCoincidence.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pathops/SkOpCoincidence.cpp b/src/pathops/SkOpCoincidence.cpp
index 3251ec4371..da1e18eb2c 100644
--- a/src/pathops/SkOpCoincidence.cpp
+++ b/src/pathops/SkOpCoincidence.cpp
@@ -693,7 +693,7 @@ bool SkOpCoincidence::addOrOverlap(SkOpSegment* coinSeg, SkOpSegment* oppSeg,
}
FAIL_IF(cs && cs->deleted());
FAIL_IF(os && os->deleted());
- SkASSERT(!ce || !ce->deleted());
+ FAIL_IF(ce && ce->deleted());
FAIL_IF(oe && oe->deleted());
const SkOpPtT* csExisting = !cs ? coinSeg->existing(coinTs, nullptr) : nullptr;
const SkOpPtT* ceExisting = !ce ? coinSeg->existing(coinTe, nullptr) : nullptr;
@@ -1095,7 +1095,7 @@ bool SkOpCoincidence::apply(DEBUG_COIN_DECLARE_ONLY_PARAMS()) {
SkDebugf("seg=%d span=%d windValue=%d oppValue=%d\n", oSegment->debugID(),
oStart->debugID(), oWindValue, oOppValue);
#endif
- FAIL_IF(windValue == -1);
+ FAIL_IF(windValue <= -1);
start->setWindValue(windValue);
start->setOppValue(oppValue);
FAIL_IF(oWindValue <= -1);