From cffbcc3b9665f2c928544b6fc6b8a0e22a4210fb Mon Sep 17 00:00:00 2001 From: "caryclark@google.com" Date: Tue, 4 Jun 2013 17:59:42 +0000 Subject: path ops -- rewrite angle sort This is a major change resulting from a minor tweak. In the old code, the intersection point of two curves was shared between them, but the intersection points and end points of sorted edges was computed directly from the intersection T value. In this CL, both intersection points and sorted points are the same, and intermediate control points are computed to preserve their slope. The sort itself has been completely rewritten to be more robust and remove 'magic' checks, conditions that empirically worked but couldn't be rationalized. This CL was triggered by errors generated computing the clips of SKP files. At this point, all 73M standard tests work and at least the first troublesome SKPs work. Review URL: https://codereview.chromium.org/15338003 git-svn-id: http://skia.googlecode.com/svn/trunk@9432 2bbb7eff-a529-9590-31e7-b0007b416f81 --- tests/PathOpsQuadIntersectionTest.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'tests/PathOpsQuadIntersectionTest.cpp') diff --git a/tests/PathOpsQuadIntersectionTest.cpp b/tests/PathOpsQuadIntersectionTest.cpp index 4276051c6c..4bb0b343f0 100644 --- a/tests/PathOpsQuadIntersectionTest.cpp +++ b/tests/PathOpsQuadIntersectionTest.cpp @@ -50,6 +50,19 @@ static void standardTestCases(skiatest::Reporter* reporter) { } static const SkDQuad testSet[] = { + {{{131.37418,11414.9825}, {130.28798,11415.9328}, {130.042755,11417.4131}}}, + {{{130.585787,11418.4142}, {130.021447,11417.8498}, {130,11417}}}, + + {{{130.73167037963867, 11418.546386718750}, {131.26360225677490, 11418.985778808592}, + {132, 11419 }}}, + {{{132, 11419}, {131.15012693405151, 11418.978546142578}, + {130.58578681945801, 11418.414184570313}}}, + + {{{132, 11419}, + {130.73167037963867, 11418.546386718750}, {131.26360225677490, 11418.985778808592}}}, + {{{131.15012693405151, 11418.978546142578}, + {130.58578681945801, 11418.414184570313}, {132, 11419}}}, + {{{3.0774019473063863, 3.35198509346713}, {3.0757503498668397, 3.327320623945933}, {3.0744102085015879, 3.3025879417907196}}}, {{{3.053913680774329, 3.3310471586283938}, {3.0758730889691694, 3.3273466070370152}, @@ -252,7 +265,7 @@ static void oneOffTest1(skiatest::Reporter* reporter, size_t outer, size_t inner } static void QuadraticIntersection_OneOffTest(skiatest::Reporter* reporter) { - oneOffTest1(reporter, 43, 47); + oneOffTest1(reporter, 0, 1); } static void oneOffTests(skiatest::Reporter* reporter) { -- cgit v1.2.3