diff options
author | caryclark <caryclark@google.com> | 2015-03-26 07:52:43 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-26 07:52:43 -0700 |
commit | 54359294a7c9dc54802d512a5d891a35c1663392 (patch) | |
tree | 7339bbad708bb43a4a96f7b76075c84ff7732189 /tests/PathOpsCubicIntersectionTestData.cpp | |
parent | c08330f1601aeca7f10aeb2194118decbfbf83e1 (diff) |
cumulative pathops patch
Replace the implicit curve intersection with a geometric curve intersection. The implicit intersection proved mathematically unstable and took a long time to zero in on an answer.
Use pointers instead of indices to refer to parts of curves. Indices required awkward renumbering.
Unify t and point values so that small intervals can be eliminated in one pass.
Break cubics up front to eliminate loops and cusps.
Make the Simplify and Op code more regular and eliminate arbitrary differences.
Add a builder that takes an array of paths and operators.
Delete unused code.
BUG=skia:3588
R=reed@google.com
Review URL: https://codereview.chromium.org/1037573004
Diffstat (limited to 'tests/PathOpsCubicIntersectionTestData.cpp')
-rw-r--r-- | tests/PathOpsCubicIntersectionTestData.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/PathOpsCubicIntersectionTestData.cpp b/tests/PathOpsCubicIntersectionTestData.cpp index 31056d2552..7f725ef9fd 100644 --- a/tests/PathOpsCubicIntersectionTestData.cpp +++ b/tests/PathOpsCubicIntersectionTestData.cpp @@ -46,8 +46,8 @@ const SkDCubic pointDegenerates[] = { const size_t pointDegenerates_count = SK_ARRAY_COUNT(pointDegenerates); const SkDCubic notPointDegenerates[] = { - {{{1 + FLT_EPSILON * 2, 1}, {1, FLT_EPSILON * 2}, {1, 1}, {1, 1}}}, - {{{1 + FLT_EPSILON * 2, 1}, {1 - FLT_EPSILON * 2, 1}, {1, 1}, {1, 1}}} + {{{1 + FLT_EPSILON * 8, 1}, {1, FLT_EPSILON * 8}, {1, 1}, {1, 1}}}, + {{{1 + FLT_EPSILON * 8, 1}, {1 - FLT_EPSILON * 8, 1}, {1, 1}, {1, 1}}} }; const size_t notPointDegenerates_count = @@ -156,8 +156,8 @@ const SkDCubic notLines[] = { const size_t notLines_count = SK_ARRAY_COUNT(notLines); -static const double E = FLT_EPSILON * 2; -static const double F = FLT_EPSILON * 3; +static const double E = FLT_EPSILON * 8; +static const double F = FLT_EPSILON * 8; const SkDCubic modEpsilonLines[] = { {{{0, E}, {0, 0}, {0, 0}, {1, 0}}}, // horizontal @@ -187,8 +187,8 @@ const SkDCubic modEpsilonLines[] = { {{{1, 1}, {2, 2}, {2, 2+E}, {1, 1}}}, {{{1, 1}, {1, 1+E}, {3, 3}, {3, 3}}}, // first-middle middle-last coincident {{{1, 1}, {2+E, 2}, {3, 3}, {4, 4}}}, // no coincident - {{{1, 1}, {3, 3}, {2, 2}, {4, 4+F}}}, // INVESTIGATE: why the epsilon is bigger - {{{1, 1+F}, {2, 2}, {4, 4}, {3, 3}}}, // INVESTIGATE: why the epsilon is bigger + {{{1, 1}, {3, 3}, {2, 2}, {4, 4+F+F}}}, // INVESTIGATE: why the epsilon is bigger + {{{1, 1+F+F}, {2, 2}, {4, 4}, {3, 3}}}, // INVESTIGATE: why the epsilon is bigger {{{1, 1}, {3, 3}, {4, 4+E}, {2, 2}}}, {{{1, 1}, {4, 4}, {2, 2}, {3, 3+E}}}, {{{1, 1}, {4, 4}, {3, 3}, {2+E, 2}}}, |