diff options
author | caryclark <caryclark@google.com> | 2015-05-13 08:23:48 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-13 08:23:48 -0700 |
commit | bca19f77479adfd8ba2171753382bc8bf4c2b4ca (patch) | |
tree | 767104fcb63f7fab8901f7f7597a12bb78bf2e1e /tests/PathOpsSimplifyTest.cpp | |
parent | 04d24a3f86b6f2382e5c6ffaf161ffc734a4d02a (diff) |
deal more consistently with unsortable edges
Improve line/curve coincident detection and resolution. This fixed the remaining simple failures.
When an edge is unsortable, use the ray intersection to determine the angles' winding.
Deal with degenerate segments.
TBR=reed@google.com
BUG=skia:3588,skia:3762
Review URL: https://codereview.chromium.org/1140813002
Diffstat (limited to 'tests/PathOpsSimplifyTest.cpp')
-rw-r--r-- | tests/PathOpsSimplifyTest.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/PathOpsSimplifyTest.cpp b/tests/PathOpsSimplifyTest.cpp index de08bd81d9..8da3cab389 100644 --- a/tests/PathOpsSimplifyTest.cpp +++ b/tests/PathOpsSimplifyTest.cpp @@ -4752,11 +4752,19 @@ static void testTriangle2(skiatest::Reporter* reporter,const char* filename) { testSimplify(reporter, path, filename); } +static void testArc(skiatest::Reporter* reporter,const char* filename) { + SkRect r = SkRect::MakeWH(150, 100); + SkPath path; + path.arcTo(r, 0, 0.0025f, false); + testSimplify(reporter, path, filename); +} + static void (*skipTest)(skiatest::Reporter* , const char* filename) = 0; static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; static TestDesc tests[] = { + TEST(testArc), TEST(testTriangle2), TEST(testTriangle1), TEST(testQuads64), |