diff options
author | Cary Clark <caryclark@google.com> | 2016-12-08 14:36:32 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-12-08 20:29:37 +0000 |
commit | 7eb01e00b1a1f7c649e1e78eb3f4644033ce94ee (patch) | |
tree | 9232481f49075cbdcd7d3da22469aa7a308882bc /tests/PathOpsOpTest.cpp | |
parent | 9bbfb657606d4c501dd4df13cc035cf38f7672c9 (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 'tests/PathOpsOpTest.cpp')
-rw-r--r-- | tests/PathOpsOpTest.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/PathOpsOpTest.cpp b/tests/PathOpsOpTest.cpp index 68250959b5..2da0d4cb08 100644 --- a/tests/PathOpsOpTest.cpp +++ b/tests/PathOpsOpTest.cpp @@ -3847,10 +3847,10 @@ static void cubicOp130(skiatest::Reporter* reporter, const char* filename) { #include "SkGeometry.h" static void complex_to_quads(const SkPoint pts[], SkPath* path) { - SkScalar loopT; - if (SkDCubic::ComplexBreak(pts, &loopT)) { + SkScalar loopT[3]; + if (SkDCubic::ComplexBreak(pts, loopT)) { SkPoint cubicPair[7]; - SkChopCubicAt(pts, cubicPair, loopT); + SkChopCubicAt(pts, cubicPair, loopT[0]); SkDCubic c1, c2; c1.set(cubicPair); c2.set(&cubicPair[3]); |