aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PathOpsDVectorTest.cpp
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2015-05-11 07:21:27 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-05-11 07:21:28 -0700
commit624637cc8ec22c000409704d0b403ac1b81ad4b0 (patch)
tree3524a1f5dfb24a5afbe3dd1ebbfb495b8c0a299e /tests/PathOpsDVectorTest.cpp
parentaf2d56d2139cc5597a5a43a4e16acbd8d10e9060 (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/PathOpsDVectorTest.cpp')
-rw-r--r--tests/PathOpsDVectorTest.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/tests/PathOpsDVectorTest.cpp b/tests/PathOpsDVectorTest.cpp
index ab291b2477..583a868149 100644
--- a/tests/PathOpsDVectorTest.cpp
+++ b/tests/PathOpsDVectorTest.cpp
@@ -28,8 +28,6 @@ DEF_TEST(PathOpsDVector, reporter) {
SkASSERT(ValidVector(v2));
v1 += v2;
REPORTER_ASSERT(reporter, v1.fX == 0 && v1.fY == 0);
- SkDPoint p = tests[index + 1] + v2;
- REPORTER_ASSERT(reporter, p == tests[index]);
v2 -= v2;
REPORTER_ASSERT(reporter, v2.fX == 0 && v2.fY == 0);
v1 = tests[index + 1] - tests[index];