From bca19f77479adfd8ba2171753382bc8bf4c2b4ca Mon Sep 17 00:00:00 2001 From: caryclark Date: Wed, 13 May 2015 08:23:48 -0700 Subject: 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 --- tests/PathOpsSimplifyTest.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/PathOpsSimplifyTest.cpp') 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), -- cgit v1.2.3