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 --- tests/PathOpsSkpTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/PathOpsSkpTest.cpp') diff --git a/tests/PathOpsSkpTest.cpp b/tests/PathOpsSkpTest.cpp index a86218da78..bbf3453b6d 100755 --- a/tests/PathOpsSkpTest.cpp +++ b/tests/PathOpsSkpTest.cpp @@ -1090,7 +1090,7 @@ static void skpcyclist_friends_gr52(skiatest::Reporter* reporter, const char* fi // FIXME: this generates quads and cubics that are (correctly) not coincident unlike the old code // however, somewhere the angles are sorted incorrectly and the winding is computed to be -1/-2 // but I can't find the error - testPathOpCheck(reporter, path, pathB, kIntersect_SkPathOp, filename, FLAGS_runFail); + testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename); } static void skpwww_fj_p_com_22(skiatest::Reporter* reporter, const char* filename) { @@ -3769,7 +3769,7 @@ pathB.cubicTo(980.018494f, 1481.22131f, 979.602478f, 1478.38831f, 984.546021f, 1 } static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; -static void (*firstTest)(skiatest::Reporter* , const char* filename) = skpwww_macrumors_com_131; +static void (*firstTest)(skiatest::Reporter* , const char* filename) = skpwww_cooksnaps_com_32; static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; static struct TestDesc tests[] = { -- cgit v1.2.3