OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 #include "PathOpsCubicIntersectionTestData.h" | 7 #include "PathOpsCubicIntersectionTestData.h" |
8 #include "PathOpsTestCommon.h" | 8 #include "PathOpsTestCommon.h" |
9 #include "SkGeometry.h" | 9 #include "SkGeometry.h" |
10 #include "SkIntersections.h" | 10 #include "SkIntersections.h" |
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 } | 646 } |
647 | 647 |
648 static void cubicIntersectionSelfTest(skiatest::Reporter* reporter) { | 648 static void cubicIntersectionSelfTest(skiatest::Reporter* reporter) { |
649 int firstFail = 0; | 649 int firstFail = 0; |
650 for (int index = firstFail; index < selfSetCount; ++index) { | 650 for (int index = firstFail; index < selfSetCount; ++index) { |
651 selfOneOff(reporter, index); | 651 selfOneOff(reporter, index); |
652 } | 652 } |
653 } | 653 } |
654 | 654 |
655 static const SkDCubic coinSet[] = { | 655 static const SkDCubic coinSet[] = { |
| 656 {{{297.04998779296875, 43.928997039794922}, {297.04998779296875, 43.92899703
9794922}, |
| 657 {300.69699096679688, 45.391998291015625}, {306.92498779296875, 43.085998
53515625}}}, |
| 658 {{{297.04998779296875, 43.928997039794922}, {297.04998779296875, 43.92899703
9794922}, |
| 659 {300.69699096679688, 45.391998291015625}, {306.92498779296875, 43.085998
53515625}}}, |
| 660 |
656 {{{2, 3}, {0, 4}, {3, 2}, {5, 3}}}, | 661 {{{2, 3}, {0, 4}, {3, 2}, {5, 3}}}, |
657 {{{2, 3}, {0, 4}, {3, 2}, {5, 3}}}, | 662 {{{2, 3}, {0, 4}, {3, 2}, {5, 3}}}, |
658 | 663 |
659 {{{317, 711}, {322.52285766601562, 711}, {327, 715.4771728515625}, {327, 721
}}}, | 664 {{{317, 711}, {322.52285766601562, 711}, {327, 715.4771728515625}, {327, 721
}}}, |
660 {{{324.07107543945312, 713.928955078125}, {324.4051513671875, 714.2630004882
8125}, | 665 {{{324.07107543945312, 713.928955078125}, {324.4051513671875, 714.2630004882
8125}, |
661 {324.71566772460937, 714.62060546875}, {325, 714.9990234375}}}, | 666 {324.71566772460937, 714.62060546875}, {325, 714.9990234375}}}, |
662 }; | 667 }; |
663 | 668 |
664 static int coinSetCount = (int) SK_ARRAY_COUNT(coinSet); | 669 static int coinSetCount = (int) SK_ARRAY_COUNT(coinSet); |
665 | 670 |
(...skipping 23 matching lines...) Expand all Loading... |
689 } | 694 } |
690 | 695 |
691 DEF_TEST(PathOpsCubicIntersection, reporter) { | 696 DEF_TEST(PathOpsCubicIntersection, reporter) { |
692 oneOffTests(reporter); | 697 oneOffTests(reporter); |
693 cubicIntersectionSelfTest(reporter); | 698 cubicIntersectionSelfTest(reporter); |
694 cubicIntersectionCoinTest(reporter); | 699 cubicIntersectionCoinTest(reporter); |
695 standardTestCases(reporter); | 700 standardTestCases(reporter); |
696 if (false) CubicIntersection_IntersectionFinder(); | 701 if (false) CubicIntersection_IntersectionFinder(); |
697 if (false) CubicIntersection_RandTest(reporter); | 702 if (false) CubicIntersection_RandTest(reporter); |
698 } | 703 } |
OLD | NEW |