Now, path ops natively intersect conics, quads, and cubics in any combination. There are still a class of cubic tests that fail and a handful of undiagnosed failures from skps and fuzz tests, but things are much better overall.
Extended tests (150M+) run to completion in release in about 6 minutes; the standard test suite exceeds 100K and finishes in a few seconds on desktops.
TBR=reed
BUG=skia:3588
Review URL: https://codereview.chromium.org/1037953004
diff --git a/src/pathops/SkPathOpsCommon.cpp b/src/pathops/SkPathOpsCommon.cpp
index 1dc171c..a16e811 100644
--- a/src/pathops/SkPathOpsCommon.cpp
+++ b/src/pathops/SkPathOpsCommon.cpp
@@ -323,7 +323,10 @@
do {
bool checkFrom = oSpan->t() < iSpan->t();
if ((checkFrom ? iSpan->fromAngle() : iSpan->upCast()->toAngle()) == NULL) {
- iSpan->addSimpleAngle(checkFrom, allocator);
+ if (!iSpan->addSimpleAngle(checkFrom, allocator)) {
+ *unsortable = true;
+ return NULL;
+ }
}
sumWinding = current->computeSum(oSpan, iSpan, angleIncludeType);
SkTSwap(iSpan, oSpan);
@@ -442,7 +445,7 @@
void Assemble(const SkPathWriter& path, SkPathWriter* simple) {
SkChunkAlloc allocator(4096); // FIXME: constant-ize, tune
SkOpContour contour;
- SkOpGlobalState globalState(NULL PATH_OPS_DEBUG_PARAMS(&contour));
+ SkOpGlobalState globalState(NULL SkDEBUGPARAMS(&contour));
#if DEBUG_PATH_CONSTRUCTION
SkDebugf("%s\n", __FUNCTION__);
#endif