aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pathops
diff options
context:
space:
mode:
authorGravatar Cary Clark <caryclark@google.com>2017-01-20 08:14:33 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-01-20 14:43:57 +0000
commit4c76c41c981dd7ea95062a1895a6e3415b70bce1 (patch)
tree297a70ab129b8965ecb0ef12a7ed332d6d125533 /src/pathops
parenteca02909f32a412c333ff14d67d8cb58862b41e2 (diff)
fix fuzz asserts triggered by old fuzzes
fuzz fixes Fixes from running all pathops fuzz testson ToT. R=kjlubick@google.com BUG=skia: Change-Id: Ic84b868a0cc53993e6561bc95fa364218bc3aa34 Reviewed-on: https://skia-review.googlesource.com/7325 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
Diffstat (limited to 'src/pathops')
-rw-r--r--src/pathops/SkAddIntersections.cpp2
-rw-r--r--src/pathops/SkOpCoincidence.cpp6
-rw-r--r--src/pathops/SkOpCoincidence.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/pathops/SkAddIntersections.cpp b/src/pathops/SkAddIntersections.cpp
index 17bc9e2ecb..b47e7df599 100644
--- a/src/pathops/SkAddIntersections.cpp
+++ b/src/pathops/SkAddIntersections.cpp
@@ -561,7 +561,7 @@ bool AddIntersectTs(SkOpContour* test, SkOpContour* next, SkOpCoincidence* coinc
wn.segment()->debugValidate();
coinIndex = -1;
}
- SkASSERT(coinIndex < 0); // expect coincidence to be paired
+ SkOPOBJASSERT(coincidence, coinIndex < 0); // expect coincidence to be paired
} while (wn.advance());
} while (wt.advance());
return true;
diff --git a/src/pathops/SkOpCoincidence.cpp b/src/pathops/SkOpCoincidence.cpp
index f9ec15709e..b4854a801a 100644
--- a/src/pathops/SkOpCoincidence.cpp
+++ b/src/pathops/SkOpCoincidence.cpp
@@ -296,7 +296,7 @@ bool SkOpCoincidence::addEndMovedSpans(const SkOpSpan* base, const SkOpSpanBase*
SkDVector dxdy = baseSeg->dSlopeAtT(base->t());
const SkPoint& pt = base->pt();
SkDLine ray = {{{pt.fX, pt.fY}, {pt.fX + dxdy.fY, pt.fY - dxdy.fX}}};
- SkIntersections i;
+ SkIntersections i SkDEBUGCODE((this->globalState()));
(*CurveIntersectRay[testSeg->verb()])(testSeg->pts(), testSeg->weight(), ray, &i);
for (int index = 0; index < i.used(); ++index) {
double t = i[0][index];
@@ -791,7 +791,7 @@ bool SkOpCoincidence::addMissing(bool* added DEBUG_COIN_DECLARE_PARAMS()) {
return true;
}
const SkOpSegment* outerOpp = oos->segment();
- SkASSERT(!outerOpp->done());
+ SkOPASSERT(!outerOpp->done());
SkOpSegment* outerCoinWritable = const_cast<SkOpSegment*>(outerCoin);
SkOpSegment* outerOppWritable = const_cast<SkOpSegment*>(outerOpp);
SkCoincidentSpans* inner = outer;
@@ -805,7 +805,7 @@ bool SkOpCoincidence::addMissing(bool* added DEBUG_COIN_DECLARE_PARAMS()) {
const SkOpPtT* ios = inner->oppPtTStart();
FAIL_IF(ios->deleted());
const SkOpSegment* innerOpp = ios->segment();
- SkASSERT(!innerOpp->done());
+ SkOPASSERT(!innerOpp->done());
SkOpSegment* innerCoinWritable = const_cast<SkOpSegment*>(innerCoin);
SkOpSegment* innerOppWritable = const_cast<SkOpSegment*>(innerOpp);
if (outerCoin == innerCoin) {
diff --git a/src/pathops/SkOpCoincidence.h b/src/pathops/SkOpCoincidence.h
index e3be828eed..92076b12c7 100644
--- a/src/pathops/SkOpCoincidence.h
+++ b/src/pathops/SkOpCoincidence.h
@@ -87,7 +87,7 @@ public:
}
void setCoinPtTStart(const SkOpPtT* ptT) {
- SkASSERT(ptT == ptT->span()->ptT());
+ SkOPASSERT(ptT == ptT->span()->ptT());
SkOPASSERT(!fCoinPtTEnd || ptT->fT != fCoinPtTEnd->fT);
SkASSERT(!fCoinPtTEnd || fCoinPtTEnd->segment() == ptT->segment());
fCoinPtTStart = ptT;