fix pathop fuzzes

throw an error instead of asserting for one

for the other, only assert if the values are trusted. That's not ideal,
but I don't see an easy way to insert a fail safety hatch in this code
and if the assert is ignored, no further assert is triggered.

verified that extended tests run without problem on debug and release

R=kjlubick@google.com
Bug: skia:
Change-Id: I5544b6cbef97479854dbecb05baae6b2c41cabc9
Reviewed-on: https://skia-review.googlesource.com/117725
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
This commit is contained in:
Cary Clark 2018-04-02 12:40:49 -04:00 committed by Skia Commit-Bot
parent 27d42198d3
commit 8d8a5d9543
2 changed files with 2 additions and 2 deletions

View File

@ -850,7 +850,7 @@ bool SkOpCoincidence::addMissing(bool* added DEBUG_COIN_DECLARE_PARAMS()) {
}
} else if (outerOpp == innerOpp) {
const SkOpPtT* ooe = outer->oppPtTEnd();
SkASSERT(!ooe->deleted());
FAIL_IF(ooe->deleted());
const SkOpPtT* ioe = inner->oppPtTEnd();
if (ioe->deleted()) {
return true;

View File

@ -127,7 +127,7 @@ public:
*eOut = between(s1->fT, end2->fT, e1->fT) ? end2
: between(s2->fT, end1->fT, e2->fT) ? end1 : nullptr;
if (*sOut == *eOut) {
SkASSERT(start1->fT >= end2->fT || start2->fT >= end1->fT);
SkOPOBJASSERT(s1, start1->fT >= end2->fT || start2->fT >= end1->fT);
return false;
}
SkASSERT(!*sOut || *sOut != *eOut);