From 0dc4dd6dda9a7912f696b46d9c02155ec1d1ba5f Mon Sep 17 00:00:00 2001 From: reed Date: Tue, 24 Mar 2015 13:55:33 -0700 Subject: Revert of pathops version two (patchset #16 id:150001 of https://codereview.chromium.org/1002693002/) Reason for revert: ASAN investigation Original issue's description: > pathops version two > > R=reed@google.com > > marked 'no commit' to attempt to get trybots to run > > TBR=reed@google.com > > Committed: https://skia.googlesource.com/skia/+/ccec0f958ffc71a9986d236bc2eb335cb2111119 TBR=caryclark@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1029993002 --- tests/PathOpsCubicIntersectionTest.cpp | 214 ++++++++------------------------- 1 file changed, 52 insertions(+), 162 deletions(-) (limited to 'tests/PathOpsCubicIntersectionTest.cpp') diff --git a/tests/PathOpsCubicIntersectionTest.cpp b/tests/PathOpsCubicIntersectionTest.cpp index a424c50c55..b6a9e5910a 100644 --- a/tests/PathOpsCubicIntersectionTest.cpp +++ b/tests/PathOpsCubicIntersectionTest.cpp @@ -6,7 +6,6 @@ */ #include "PathOpsCubicIntersectionTestData.h" #include "PathOpsTestCommon.h" -#include "SkGeometry.h" #include "SkIntersections.h" #include "SkPathOpsRect.h" #include "SkReduceOrder.h" @@ -163,60 +162,6 @@ static const SkDCubic testSet[] = { const int testSetCount = (int) SK_ARRAY_COUNT(testSet); static const SkDCubic newTestSet[] = { -{{{980.026001,1481.276}, {980.026001,1481.276}, {980.02594,1481.27576}, {980.025879,1481.27527}}}, -{{{980.025879,1481.27527}, {980.025452,1481.27222}, {980.023743,1481.26038}, {980.02179,1481.24072}}}, - -{{{1.80943513,3.07782435}, {1.66686702,2.16806936}, {1.68301272,0}, {3,0}}}, -{{{0,1}, {0,3}, {3,2}, {5,2}}}, - -{{{3.4386673,2.66977954}, {4.06668949,2.17046738}, {4.78887367,1.59629118}, {6,2}}}, -{{{1.71985495,3.49467373}, {2.11620402,2.7201426}, {2.91897964,1.15138781}, {6,3}}}, - -{{{0,1}, {0.392703831,1.78540766}, {0.219947904,2.05676103}, {0.218561709,2.05630541}}}, -{{{0.218561709,2.05630541}, {0.216418028,2.05560064}, {0.624105453,1.40486407}, {4.16666651,1.00000012}}}, - -{{{0, 1}, {3, 5}, {2, 1}, {3, 1}}}, -{{{1.01366711f, 2.21379328f}, {1.09074128f, 2.23241305f}, {1.60246587f, 0.451849401f}, {5, 3}}}, - -{{{0, 1}, {0.541499972f, 3.16599989f}, {1.08299994f, 2.69299984f}, {2.10083938f, 1.80391729f}}}, -{{{0.806384504f, 2.85426903f}, {1.52740121f, 1.99355423f}, {2.81689167f, 0.454222918f}, {5, 1}}}, - -{{{0, 1}, {1.90192389f, 2.90192389f}, {2.59807634f, 2.79422879f}, {3.1076951f, 2.71539044f}}}, -{{{2, 3}, {2.36602545f, 3.36602545f}, {2.330127f, 3.06217766f}, {2.28460979f, 2.67691422f}}}, - -{{{0, 1}, {1.90192389f, 2.90192389f}, {2.59807634f, 2.79422879f}, {3.1076951f, 2.71539044f}}}, -{{{2.28460979f, 2.67691422f}, {2.20577145f, 2.00961876f}, {2.09807634f, 1.09807622f}, {4, 3}}}, - -{{{0, 1}, {0.8211091160774231, 2.0948121547698975}, {0.91805583238601685, 2.515404224395752}, {0.91621249914169312, 2.5146586894989014}}}, -{{{0.91621249914169312, 2.5146586894989014}, {0.91132104396820068, 2.5126807689666748}, {0.21079301834106445, -0.45617169141769409}, {10.5, -1.6666665077209473}}}, - -{{{42.6237564,68.9841232}, {32.449646,81.963089}, {14.7713947,103.565269}, {12.6310005,105.247002}}}, -{{{37.2640038,95.3540039}, {37.2640038,95.3540039}, {11.3710003,83.7339935}, {-25.0779991,124.912003}}}, - -{{{0,1}, {4,5}, {6,0}, {1,0}}}, -{{{0,6}, {0,1}, {1,0}, {5,4}}}, - -{{{0,1}, {4,6}, {5,1}, {6,2}}}, -{{{1,5}, {2,6}, {1,0}, {6,4}}}, - -{{{322, 896.04803466796875}, {314.09201049804687, 833.4376220703125}, {260.24713134765625, 785}, {195, 785}}}, -{{{195, 785}, {265.14016723632812, 785}, {322, 842.30755615234375}, {322, 913}}}, - -{{{1, 4}, {4, 5}, {3, 2}, {6, 3}}}, -{{{2, 3}, {3, 6}, {4, 1}, {5, 4}}}, - -{{{67, 913}, {67, 917.388916015625}, {67.224380493164063, 921.72576904296875}, {67.662384033203125, 926}}}, -{{{194, 1041}, {123.85984039306641, 1041}, {67, 983.69244384765625}, {67, 913}}}, - -{{{1,4}, {1,5}, {6,0}, {5,1}}}, -{{{0,6}, {1,5}, {4,1}, {5,1}}}, - -{{{0,1}, {4,5}, {6,0}, {1,0}}}, -{{{0,6}, {0,1}, {1,0}, {5,4}}}, - -{{{0,1}, {4,6}, {2,0}, {2,0}}}, -{{{0,2}, {0,2}, {1,0}, {6,4}}}, - {{{980.9000244140625, 1474.3280029296875}, {980.9000244140625, 1474.3280029296875}, {978.89300537109375, 1471.95703125}, {981.791015625, 1469.487060546875}}}, {{{981.791015625, 1469.487060546875}, {981.791015625, 1469.4859619140625}, {983.3580322265625, 1472.72900390625}, {980.9000244140625, 1474.3280029296875}}}, @@ -361,6 +306,7 @@ static const SkDCubic newTestSet[] = { }; const int newTestSetCount = (int) SK_ARRAY_COUNT(newTestSet); + static void oneOff(skiatest::Reporter* reporter, const SkDCubic& cubic1, const SkDCubic& cubic2, bool coin) { SkASSERT(ValidCubic(cubic1)); @@ -374,22 +320,28 @@ static void oneOff(skiatest::Reporter* reporter, const SkDCubic& cubic1, const S cubic2[0].fX, cubic2[0].fY, cubic2[1].fX, cubic2[1].fY, cubic2[2].fX, cubic2[2].fY, cubic2[3].fX, cubic2[3].fY); #endif -#if DEBUG_T_SECT_DUMP > 1 - gDumpTSectNum = 0; -#endif - SkIntersections intersections; - intersections.intersect(cubic1, cubic2); -#if DEBUG_T_SECT_DUMP == 3 - SkDebugf("\n\n"); - SkDebugf("