aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/pathops_sorter.htm
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 /tools/pathops_sorter.htm
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 'tools/pathops_sorter.htm')
-rw-r--r--tools/pathops_sorter.htm24
1 files changed, 14 insertions, 10 deletions
diff --git a/tools/pathops_sorter.htm b/tools/pathops_sorter.htm
index b66b82f9f6..967ac316eb 100644
--- a/tools/pathops_sorter.htm
+++ b/tools/pathops_sorter.htm
@@ -7,23 +7,27 @@
<div style="height:0">
<div id="cubics">
-{{{123.637985f, 102.405312f}, {125.172699f, 104.575714f}, {123.387383f, 106.91227f}}} id=7
-{{{123.387383f, 106.91227f}, {122.784996f, 106.452003f}}} id=8
-{{{122.784996f, 106.452003f}, {123.388428f, 106.910896f}}} id=9
-{{{123.388428f, 106.910896f}, {123.365623f, 106.94088f}, {123.320007f, 107.000946f}}} id=10
+{{{403.28299,497.196991}, {403.424011,497.243988}, {391.110992,495.556}, {391.110992,495.556}}}
+{{{398.375,501.976013}, {403.28299,497.196991}}}
+{{{403.42401123046875, 497.243988037109375}, {378.7979736328125, 493.868011474609375}}}, id=0
+{{{415.5605946972181641, 498.8838844379989155}, {378.8318672594865006, 493.8897667505245295}}}, id=1
+{{{403.2954048004600622, 497.117149457477467}, {403.2729768294798873, 497.2781265045034615}}}, id=2
+{{{403.42401123046875, 497.243988037109375}, {378.7979736328125, 493.868011474609375}}}, id=3
+
</div>
-<div id="q1">
-{{{123.637985f, 102.405312f}, {125.172699f, 104.575714f}, {123.387383f, 106.91227f}}} id=7
-{{{123.388428f, 106.910896f}, {123.365623f, 106.94088f}, {123.320007f, 107.000946f}}} id=10
- </div>
+<div id="c1">
+{{{403.28299f, 497.196991f}, {403.284241f, 497.197388f}, {403.28418f, 497.197632f}}}
+{{{403.28418f, 497.197632f}, {403.280487f, 497.224304f}, {391.110992f, 495.556f}, {391.110992f, 495.556f}}}
+
+</div>
</div>
<script type="text/javascript">
var testDivs = [
- q1,
- cubics
+ c1,
+ cubics,
];
var decimal_places = 3;