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 "PathOpsQuadIntersectionTestData.h" | 7 #include "PathOpsQuadIntersectionTestData.h" |
8 #include "PathOpsTestCommon.h" | 8 #include "PathOpsTestCommon.h" |
9 #include "SkIntersections.h" | 9 #include "SkIntersections.h" |
10 #include "SkPathOpsRect.h" | 10 #include "SkPathOpsRect.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 tt2, xy2.fX, xy2.fY); | 46 tt2, xy2.fX, xy2.fY); |
47 REPORTER_ASSERT(reporter, 0); | 47 REPORTER_ASSERT(reporter, 0); |
48 } | 48 } |
49 } | 49 } |
50 } | 50 } |
51 } | 51 } |
52 } | 52 } |
53 } | 53 } |
54 | 54 |
55 static const SkDQuad testSet[] = { | 55 static const SkDQuad testSet[] = { |
| 56 {{{-0.001019871095195412636, -0.008523519150912761688}, {-0.00539640802890062332
2, -0.005396373569965362549}, {-0.02855382487177848816, -0.02855364233255386353}
}}, |
| 57 {{{-0.004567248281091451645, -0.01482933573424816132}, {-0.01142475008964538574,
-0.01140109263360500336}, {-0.02852955088019371033, -0.02847047336399555206}}}, |
| 58 |
56 {{{1, 1}, {0, 2}, {3, 3}}}, | 59 {{{1, 1}, {0, 2}, {3, 3}}}, |
57 {{{3, 0}, {0, 1}, {1, 2}}}, | 60 {{{3, 0}, {0, 1}, {1, 2}}}, |
58 | 61 |
59 {{{0.33333333333333326, 0.81481481481481488}, {0.63395173631977997, 0.6874413672
6313931}, {1.205684411948591, 0.81344322326274499}}}, | 62 {{{0.33333333333333326, 0.81481481481481488}, {0.63395173631977997, 0.6874413672
6313931}, {1.205684411948591, 0.81344322326274499}}}, |
60 {{{0.33333333333333326, 0.81481481481481488}, {0.63396444791444551, 0.6874336836
2444768}, {1.205732763658403, 0.81345617746834109}}}, | 63 {{{0.33333333333333326, 0.81481481481481488}, {0.63396444791444551, 0.6874336836
2444768}, {1.205732763658403, 0.81345617746834109}}}, |
61 | 64 |
62 {{{4981.9990234375, 1590}, {4981.9990234375, 1617.7523193359375}, {4962.375, 163
7.3760986328125}}}, | 65 {{{4981.9990234375, 1590}, {4981.9990234375, 1617.7523193359375}, {4962.375, 163
7.3760986328125}}}, |
63 {{{4962.3759765625, 1637.3760986328125}, {4982, 1617.7523193359375}, {4982, 1590
}}}, | 66 {{{4962.3759765625, 1637.3760986328125}, {4982, 1617.7523193359375}, {4982, 1590
}}}, |
64 | 67 |
65 {{{48.7416f, 7.74160004f}, {96.4831848f, -40}, {164, -40}}}, | 68 {{{48.7416f, 7.74160004f}, {96.4831848f, -40}, {164, -40}}}, |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 } | 531 } |
529 for (int x = 0; x < 100; ++x) { | 532 for (int x = 0; x < 100; ++x) { |
530 for (size_t test = 0; test < quadraticTests_count; ++test) { | 533 for (size_t test = 0; test < quadraticTests_count; ++test) { |
531 const SkDQuad& quad1 = quadraticTests[test][0]; | 534 const SkDQuad& quad1 = quadraticTests[test][0]; |
532 const SkDQuad& quad2 = quadraticTests[test][1]; | 535 const SkDQuad& quad2 = quadraticTests[test][1]; |
533 (void) intersections.intersect(quad1, quad2); | 536 (void) intersections.intersect(quad1, quad2); |
534 REPORTER_ASSERT(reporter, intersections.used() >= 0); // make sure
code isn't tossed | 537 REPORTER_ASSERT(reporter, intersections.used() >= 0); // make sure
code isn't tossed |
535 } | 538 } |
536 } | 539 } |
537 } | 540 } |
OLD | NEW |