aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/pathops_sorter.htm
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2015-10-30 12:03:06 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-10-30 12:03:06 -0700
commitef784fb7f58c9c021172045a8e0b396c81fdc425 (patch)
tree2aa7203e7a6cf28737c89c7fb27d711da9223047 /tools/pathops_sorter.htm
parent498d7ac86bfb45bdfc8f9aa7424f7236235987b5 (diff)
More conic-specific tests revealed a few conic-specific bugs. Because javascript / canvas make visualizing conics tricky, new native tools are required.
The utility SubsetPath removes parts of a potentially very large path to isolate a minimal test case. SubsetPath is very useful for debugging path ops, but is not path ops specific. PathOpsBuilderConicTest compares the output of the Path Ops Builder, sequential calls to Simplify, and SkRegions for some number of rotated ovals. Some tests caused path ops to hang. It was caught adding a loop of curves because the head was not found by the tail. Even though the root cause has been fixed, SkSegment::addCurveTo callers now abort the path op if the same curve was added twice. The subdivided conic weight was been computed anew. Fortunately, it's a simpler computation that the one it replaces. Some Simplify() subroutines returned false to signal that the results needed assembling. Change these to abort the current operation instead. Coincident curve intersection triggered two small bugs; one where no perpendicular could be found for coincident curves, and one where no coincident curves remain after looping. The SixtyOvals test can be run through multiple processes instead of multiple threads. This strategy allows a 48 core machine to saturate all cores at 100%. The DEBUG_VISUALIZE_CONICS code in PathOpsConicIntersectionTest acknowleges that it is easier to visualize conics with Skia than with script and html canvas. This test also verifies that path ops subdivision matches geometry chopping. TBR=reed@google.com Review URL: https://codereview.chromium.org/1405383004
Diffstat (limited to 'tools/pathops_sorter.htm')
-rw-r--r--tools/pathops_sorter.htm63
1 files changed, 48 insertions, 15 deletions
diff --git a/tools/pathops_sorter.htm b/tools/pathops_sorter.htm
index a86353b5f9..3c24aeb138 100644
--- a/tools/pathops_sorter.htm
+++ b/tools/pathops_sorter.htm
@@ -6,22 +6,51 @@
<title></title>
<div style="height:0">
-<div id="conics">
-{{{78.000016756859424, 4590.0127645689281}, {78, 4590.005859375}}},
-{{{78.000022914349017, 4590.0165822692597}, {78.000005725317905, 4590.0082887743229}}},
-{{{{83, 4595}, {78.008674621582031, 4595}, {78, 4590.005859375}}}, 0.707720578f},
-{{{{84, 4596}, {78, 4596}, {78, 4590}}}, 0.707106769f},
+<div id="sect0">
+{{{{306.588013,-227.983994}, {212.464996,-262.242004}, {95.5512009,58.9763985}}}, 0.707107008f},
+{{{{377.218994,-141.981003}, {40.578701,-201.339996}, {23.1854992,-102.697998}}}, 0.707107008f},
</div>
-<div id="conicLines">
-{{{78.000016756859424, 4590.0127645689281}, {78, 4590.005859375}}},
-{{{78.000022914349017, 4590.0165822692597}, {78.000005725317905, 4590.0082887743229}}},
+<div id="sect1">
+{{{{377.218994,-141.981003}, {40.578701,-201.339996}, {23.1854992,-102.697998}}}, 0.707107008f},
+{{{{306.58801299999999, -227.983994}, {212.46499600000001, -262.24200400000001}, {95.551200899999998, 58.976398500000002}}}, 0.707107008f} id=1
+{{{{377.21899400000001, -141.98100299999999}, {237.77799285476553, -166.56830755921084}, {134.08399674208422, -155.06258330544892}}}, 0.788580656f} id=2
+{{{{134.08399674208422, -155.06258330544892}, {30.390000629402859, -143.55685905168704}, {23.185499199999999, -102.697998}}}, 0.923879623f} id=4
</div>
-<div id="thisopp">
-{{{78.000016756859424, 4590.0127645689281}, {78, 4590.005859375}}},
-{{{{84, 4596}, {78, 4596}, {78, 4590}}}, 0.707106769f},
-{{{78.0000055,4590.00813) (78.0000367,4590.02099
+<div id="sect2">
+{{{{306.588013,-227.983994}, {212.464996,-262.242004}, {95.5512009,58.9763985}}}, 0.707107008f},
+{{{{377.218994,-141.981003}, {40.578701,-201.339996}, {23.1854992,-102.697998}}}, 0.707107008f},
+{{{{205.78973252799028, -158.12538713371103}, {143.97848953841861, -74.076645245042371}, {95.551200899999998, 58.976398500000002}}}, 0.923879623f} id=3
+{{{{377.21899400000001, -141.98100299999999}, {237.77799285476553, -166.56830755921084}, {134.08399674208422, -155.06258330544892}}}, 0.788580656f} id=2
+</div>
+
+<div id="sect3">
+{{{{306.588013,-227.983994}, {212.464996,-262.242004}, {95.5512009,58.9763985}}}, 0.707107008f},
+{{{{377.218994,-141.981003}, {40.578701,-201.339996}, {23.1854992,-102.697998}}}, 0.707107008f},
+{{{{205.78973252799028, -158.12538713371103}, {143.97848953841861, -74.076645245042371}, {95.551200899999998, 58.976398500000002}}}, 0.923879623f} id=3
+{{{{252.08225670812539, -156.90491625851064}, {185.93099479842493, -160.81544543232982}, {134.08399674208422, -155.06258330544892}}}, 0.835816324f} id=6
+</div>
+
+<div id="sect4">
+{{{{306.588013,-227.983994}, {212.464996,-262.242004}, {95.5512009,58.9763985}}}, 0.707107008f},
+{{{{377.218994,-141.981003}, {40.578701,-201.339996}, {23.1854992,-102.697998}}}, 0.707107008f},
+{{{{205.78973252799028, -158.12538713371103}, {174.88411103320448, -116.10101618937664}, {145.19509369736275, -56.857102571363754}}}, 0.871667147f} id=3
+{{{{252.08225670812539, -156.90491625851064}, {185.93099479842493, -160.81544543232982}, {134.08399674208422, -155.06258330544892}}}, 0.835816324f} id=6
+</div>
+
+<div id="sect5">
+{{{{306.588013,-227.983994}, {212.464996,-262.242004}, {95.5512009,58.9763985}}}, 0.707107008f},
+{{{{377.218994,-141.981003}, {40.578701,-201.339996}, {23.1854992,-102.697998}}}, 0.707107008f},
+{{{{205.78973252799028, -158.12538713371103}, {174.88411103320448, -116.10101618937664}, {145.19509369736275, -56.857102571363754}}}, 0.871667147f} id=3
+{{{{252.08225670812539, -156.90491625851064}, {219.70109133058406, -158.81912754088933}, {190.17095392508796, -158.38373974664466}}}, 0.858306944f} id=6
+</div>
+
+<div id="sect6">
+{{{{306.588013,-227.983994}, {212.464996,-262.242004}, {95.5512009,58.9763985}}}, 0.707107008f},
+{{{{377.218994,-141.981003}, {40.578701,-201.339996}, {23.1854992,-102.697998}}}, 0.707107008f},
+{{{{205.78973252799028, -158.12538713371103}, {190.33692178059735, -137.11320166154385}, {174.87004877564593, -111.2132534799228}}}, 0.858117759f} id=3
+{{{{252.08225670812539, -156.90491625851064}, {219.70109133058406, -158.81912754088933}, {190.17095392508796, -158.38373974664466}}}, 0.858306944f} id=6
</div>
</div>
@@ -29,9 +58,13 @@
<script type="text/javascript">
var testDivs = [
-conics,
-conicLines,
-thisopp,
+sect0,
+sect1,
+sect2,
+sect3,
+sect4,
+sect5,
+sect6,
];
var decimal_places = 3;