From 624637cc8ec22c000409704d0b403ac1b81ad4b0 Mon Sep 17 00:00:00 2001 From: caryclark Date: Mon, 11 May 2015 07:21:27 -0700 Subject: Path ops formerly found the topmost unprocessed edge and determined its angle sort order to initialize the winding. This never worked correctly with cubics and was flaky with paths consisting mostly of vertical edges. This replacement shoots axis-aligned rays through all intersecting edges to find the outermost one either horizontally or vertically. The resulting code is smaller and twice as fast. To support this, most of the horizontal / vertical intersection code was rewritten and standardized, and old code supporting the top-directed winding was deleted. Contours were pointed to by an SkTDArray. Instead, put them in a linked list, and designate the list head with its own class to ensure that methods that take lists of contours start at the top. This change removed a large percentage of memory allocations used by path ops. TBR=reed@google.com BUG=skia:3588 Review URL: https://codereview.chromium.org/1111333002 --- tools/pathops_visualizer.htm | 673 +++++++++++++++++++++++++++++-------------- 1 file changed, 451 insertions(+), 222 deletions(-) (limited to 'tools/pathops_visualizer.htm') diff --git a/tools/pathops_visualizer.htm b/tools/pathops_visualizer.htm index f1288f0fe8..8f939313ab 100644 --- a/tools/pathops_visualizer.htm +++ b/tools/pathops_visualizer.htm @@ -2,225 +2,389 @@