aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pathops/SkPathOpsCommon.h
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2016-06-08 04:28:19 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-06-08 04:28:19 -0700
commitdae6b97705fde08958b1a36fa6ce685d28fc692c (patch)
tree39b7c096c331a0a29a43ddc7455705f821f5f640 /src/pathops/SkPathOpsCommon.h
parent2af4599b5c514933bf997d4837ddaaf24fc61cd7 (diff)
fix pathops fuzz bugs
Fail out in a couple of new places when the input data is very large and exceeds the limits of the pathops machinery. Most of the change here plumbs in a way to exclude an assert in one of these exceptional cases. The current SkAddIntersection implementation and the inner functions it calls has no way to report an error to the root caller for an early exit, so rather than add that in, exclude the assert when the test that would trigger it runs (allowing the test to otherwise ensure that it properly fails). TBR=reed@google.com BUG=617586,617635 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2046713003 Review-Url: https://codereview.chromium.org/2046713003
Diffstat (limited to 'src/pathops/SkPathOpsCommon.h')
-rw-r--r--src/pathops/SkPathOpsCommon.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pathops/SkPathOpsCommon.h b/src/pathops/SkPathOpsCommon.h
index 73bc0f42cc..856a984ce5 100644
--- a/src/pathops/SkPathOpsCommon.h
+++ b/src/pathops/SkPathOpsCommon.h
@@ -22,11 +22,12 @@ SkOpSegment* FindChase(SkTDArray<SkOpSpanBase*>* chase, SkOpSpanBase** startPtr,
SkOpSpan* FindSortableTop(SkOpContourHead* );
SkOpSegment* FindUndone(SkOpContourHead* , SkOpSpanBase** startPtr,
SkOpSpanBase** endPtr);
-void FixWinding(SkPath* path);
+bool FixWinding(SkPath* path);
bool SortContourList(SkOpContourHead** , bool evenOdd, bool oppEvenOdd);
bool HandleCoincidence(SkOpContourHead* , SkOpCoincidence* , SkChunkAlloc* );
bool OpDebug(const SkPath& one, const SkPath& two, SkPathOp op, SkPath* result,
- bool expectSuccess SkDEBUGPARAMS(const char* testName));
+ bool expectSuccess SkDEBUGPARAMS(bool skipAssert)
+ SkDEBUGPARAMS(const char* testName));
#if DEBUG_ACTIVE_SPANS
void DebugShowActiveSpans(SkOpContourHead* );
#endif