diff options
author | caryclark <caryclark@google.com> | 2015-05-11 07:21:27 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-11 07:21:28 -0700 |
commit | 624637cc8ec22c000409704d0b403ac1b81ad4b0 (patch) | |
tree | 3524a1f5dfb24a5afbe3dd1ebbfb495b8c0a299e /tests/PathOpsIssue3651.cpp | |
parent | af2d56d2139cc5597a5a43a4e16acbd8d10e9060 (diff) |
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
Diffstat (limited to 'tests/PathOpsIssue3651.cpp')
-rw-r--r-- | tests/PathOpsIssue3651.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/PathOpsIssue3651.cpp b/tests/PathOpsIssue3651.cpp index cb4c7e81f3..4e732a1f1e 100644 --- a/tests/PathOpsIssue3651.cpp +++ b/tests/PathOpsIssue3651.cpp @@ -1094,7 +1094,7 @@ path.close(); static void issue3651_1(skiatest::Reporter* reporter, const char* filename) { SkPath path = path1(); SkPath pathB = path2(); - testPathOp(reporter, path, pathB, SkPathOp::kUnion_SkPathOp, filename); + testPathOpCheck(reporter, path, pathB, SkPathOp::kUnion_SkPathOp, filename, FLAGS_runFail); } static void issue3651_2(skiatest::Reporter* reporter, const char* filename) { @@ -1281,7 +1281,7 @@ path.cubicTo(SkBits2Float(0x433f5555), SkBits2Float(0x43346920), SkBits2Float(0x path.lineTo(SkBits2Float(0x4340b333), SkBits2Float(0x43346666)); // 192.7f, 180.4f path.lineTo(SkBits2Float(0x433a8ccd), SkBits2Float(0x43346666)); // 186.55f, 180.4f path.close(); - testPathOpCheck(reporter, pathA, path, SkPathOp::kUnion_SkPathOp, filename, FLAGS_runFail); + testPathOp(reporter, pathA, path, SkPathOp::kUnion_SkPathOp, filename); } static void issue3651_5(skiatest::Reporter* reporter, const char* filename) { @@ -1344,7 +1344,7 @@ path.cubicTo(SkBits2Float(0x42a73333), SkBits2Float(0x4380ab4f), SkBits2Float(0x path.lineTo(SkBits2Float(0x42ab999a), SkBits2Float(0x4380b333)); // 85.8f, 257.4f path.lineTo(SkBits2Float(0x411e6666), SkBits2Float(0x4380b333)); // 9.9f, 257.4f path.close(); - testPathOpCheck(reporter, pathA, path, SkPathOp::kUnion_SkPathOp, filename, FLAGS_runFail); + testPathOp(reporter, pathA, path, SkPathOp::kUnion_SkPathOp, filename); } static void issue3651_6(skiatest::Reporter* reporter, const char* filename) { |