aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pathops/SkOpSegment.cpp
diff options
context:
space:
mode:
authorGravatar Cary Clark <caryclark@google.com>2016-12-08 14:36:32 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-12-08 20:29:37 +0000
commit7eb01e00b1a1f7c649e1e78eb3f4644033ce94ee (patch)
tree9232481f49075cbdcd7d3da22469aa7a308882bc /src/pathops/SkOpSegment.cpp
parent9bbfb657606d4c501dd4df13cc035cf38f7672c9 (diff)
simplify bug
The path contains a cubic with a very tight curve. Split the cubic into pieces so that the individual curves are better behaved. Use both inflections and max curvature to potentially split cubics. Since this may require a bit of work, preflight to ignore cubics that monotonically change in x and y. Only one of the three tests referred to by the bug below repro'd. Use path.dumpHex() instead of path.dump() to capture the crashing data. TBR=reed@google.com BUG=skia:6041 Change-Id: I29a264f87242cacc7c421e7685b90aca81621c74 Reviewed-on: https://skia-review.googlesource.com/5702 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
Diffstat (limited to 'src/pathops/SkOpSegment.cpp')
-rw-r--r--src/pathops/SkOpSegment.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pathops/SkOpSegment.cpp b/src/pathops/SkOpSegment.cpp
index a1818d36cd..95f4a983f2 100644
--- a/src/pathops/SkOpSegment.cpp
+++ b/src/pathops/SkOpSegment.cpp
@@ -1211,8 +1211,8 @@ bool SkOpSegment::moveMultiples() {
SkOpSpanBase* test = &fHead;
do {
int addCount = test->spanAddsCount();
- FAIL_IF(addCount < 1);
- if (addCount == 1) {
+// FAIL_IF(addCount < 1);
+ if (addCount <= 1) {
continue;
}
SkOpPtT* startPtT = test->ptT();