aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pathops/SkPathOpsOp.cpp
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2016-08-26 14:24:24 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-08-26 14:24:24 -0700
commit79418093c1bbae215e074d7e80dba29bbf960366 (patch)
tree2ab7742f19bce9cf91f48e6403ae0e76e8b6b88d /src/pathops/SkPathOpsOp.cpp
parentcab0bb7fc694a59de379befb6062f48fdd1b731c (diff)
if the winding of the top can't be computed, give up
TBR=reed@google.com BUG=641478 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2283993002 Review-Url: https://codereview.chromium.org/2283993002
Diffstat (limited to 'src/pathops/SkPathOpsOp.cpp')
-rw-r--r--src/pathops/SkPathOpsOp.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/pathops/SkPathOpsOp.cpp b/src/pathops/SkPathOpsOp.cpp
index a24fb2ff4c..9472594b4a 100644
--- a/src/pathops/SkPathOpsOp.cpp
+++ b/src/pathops/SkPathOpsOp.cpp
@@ -46,7 +46,15 @@ static SkOpSegment* findChaseOp(SkTDArray<SkOpSpanBase*>& chase, SkOpSpanBase**
if (sortable) {
segment = angle->segment();
sumMiWinding = segment->updateWindingReverse(angle);
+ if (sumMiWinding == SK_MinS32) {
+ SkASSERT(segment->globalState()->debugSkipAssert());
+ return nullptr;
+ }
sumSuWinding = segment->updateOppWindingReverse(angle);
+ if (sumSuWinding == SK_MinS32) {
+ SkASSERT(segment->globalState()->debugSkipAssert());
+ return nullptr;
+ }
if (segment->operand()) {
SkTSwap<int>(sumMiWinding, sumSuWinding);
}