| 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 | 7 |
| 8 #include "PathOpsQuadIntersectionTestData.h" | 8 #include "PathOpsQuadIntersectionTestData.h" |
| 9 | 9 |
| 10 const SkDQuad quadraticPoints[] = { | 10 const SkDQuad quadraticPoints[] = { |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 {{{2, 2}, {1, 1}, {3, 3}}}, | 37 {{{2, 2}, {1, 1}, {3, 3}}}, |
| 38 {{{2, 2}, {1, 1}, {4, 4}}}, | 38 {{{2, 2}, {1, 1}, {4, 4}}}, |
| 39 {{{2, 2}, {3, 3}, {1, 1}}}, | 39 {{{2, 2}, {3, 3}, {1, 1}}}, |
| 40 {{{2, 2}, {3, 3}, {4, 4}}}, | 40 {{{2, 2}, {3, 3}, {4, 4}}}, |
| 41 {{{2, 2}, {4, 4}, {1, 1}}}, | 41 {{{2, 2}, {4, 4}, {1, 1}}}, |
| 42 {{{2, 2}, {4, 4}, {3, 3}}}, | 42 {{{2, 2}, {4, 4}, {3, 3}}}, |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 const size_t quadraticLines_count = SK_ARRAY_COUNT(quadraticLines); | 45 const size_t quadraticLines_count = SK_ARRAY_COUNT(quadraticLines); |
| 46 | 46 |
| 47 static const double F = FLT_EPSILON * 3; | 47 static const double F = FLT_EPSILON * 32; |
| 48 static const double H = FLT_EPSILON * 4; | 48 static const double H = FLT_EPSILON * 32; |
| 49 static const double J = FLT_EPSILON * 5; | 49 static const double J = FLT_EPSILON * 32; |
| 50 static const double K = FLT_EPSILON * 8; // INVESTIGATE: why are larger multipl
es necessary? | 50 static const double K = FLT_EPSILON * 32; // INVESTIGATE: why are larger multip
les necessary? |
| 51 | 51 |
| 52 const SkDQuad quadraticModEpsilonLines[] = { | 52 const SkDQuad quadraticModEpsilonLines[] = { |
| 53 {{{0, F}, {0, 0}, {1, 0}}}, | 53 {{{0, F}, {0, 0}, {1, 0}}}, |
| 54 {{{0, 0}, {1, 0}, {0, F}}}, | 54 {{{0, 0}, {1, 0}, {0, F}}}, |
| 55 {{{1, 0}, {0, F}, {0, 0}}}, | 55 {{{1, 0}, {0, F}, {0, 0}}}, |
| 56 {{{1, H}, {2, 0}, {3, 0}}}, | 56 {{{1, H}, {2, 0}, {3, 0}}}, |
| 57 // {{{F, 0}, {0, 0}, {0, 1}}}, // INVESTIGATE: even substituting K for F, quad
is still linear. | 57 // {{{F, 0}, {0, 0}, {0, 1}}}, // INVESTIGATE: even substituting K for F, quad
is still linear. |
| 58 // {{{0, 0}, {0, 1}, {F, 0}}}, | 58 // {{{0, 0}, {0, 1}, {F, 0}}}, |
| 59 // {{{0, 1}, {F, 0}, {0, 0}}}, | 59 // {{{0, 1}, {F, 0}, {0, 0}}}, |
| 60 // {{{H, 1}, {0, 2}, {0, 3}}}, | 60 // {{{H, 1}, {0, 2}, {0, 3}}}, |
| 61 {{{0, F}, {0, 0}, {1, 1}}}, | 61 {{{0, F}, {0, 0}, {1, 1}}}, |
| 62 {{{0, 0}, {1, 1}, {F, 0}}}, | 62 {{{0, 0}, {1, 1}, {F, 0}}}, |
| 63 {{{1, 1}, {F, 0}, {0, 0}}}, | 63 {{{1, 1}, {F, 0}, {0, 0}}}, |
| 64 {{{1, 1+J}, {2, 2}, {3, 3}}}, | 64 {{{1, 1+J}, {2, 2}, {3, 3}}}, |
| 65 {{{1, 1}, {3, 3}, {3+F, 3}}}, | 65 {{{1, 1}, {3, 3}, {3+F, 3}}}, |
| 66 {{{1, 1}, {1+F, 1}, {2, 2}}}, | 66 {{{1, 1}, {1+F, 1}, {2, 2}}}, |
| 67 {{{1, 1}, {2, 2}, {1, 1+F}}}, | 67 {{{1, 1}, {2, 2}, {1, 1+K}}}, |
| 68 {{{1, 1}, {1, 1+F}, {3, 3}}}, | 68 {{{1, 1}, {1, 1+F}, {3, 3}}}, |
| 69 {{{1+H, 1}, {2, 2}, {4, 4}}}, // no coincident | 69 {{{1+H, 1}, {2, 2}, {4, 4}}}, // no coincident |
| 70 {{{1, 1+K}, {3, 3}, {4, 4}}}, | 70 {{{1, 1+K}, {3, 3}, {4, 4}}}, |
| 71 {{{1, 1}, {3+F, 3}, {2, 2}}}, | 71 {{{1, 1}, {3+F, 3}, {2, 2}}}, |
| 72 {{{1, 1}, {4, 4+F}, {2, 2}}}, | 72 {{{1, 1}, {4, 4+F}, {2, 2}}}, |
| 73 {{{1, 1}, {4, 4}, {3+F, 3}}}, | 73 {{{1, 1}, {4, 4}, {3+F, 3}}}, |
| 74 {{{2, 2}, {1, 1}, {3, 3+F}}}, | 74 {{{2, 2}, {1, 1}, {3, 3+F}}}, |
| 75 {{{2+F, 2}, {1, 1}, {4, 4}}}, | 75 {{{2+F, 2}, {1, 1}, {4, 4}}}, |
| 76 {{{2, 2+F}, {3, 3}, {1, 1}}}, | 76 {{{2, 2+F}, {3, 3}, {1, 1}}}, |
| 77 {{{2, 2}, {3+F, 3}, {4, 4}}}, | 77 {{{2, 2}, {3+F, 3}, {4, 4}}}, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 95 {{{1, 0}, | 95 {{{1, 0}, |
| 96 {2, 6}, | 96 {2, 6}, |
| 97 {3, 0}}}, | 97 {3, 0}}}, |
| 98 {{{0, 1}, | 98 {{{0, 1}, |
| 99 {6, 2}, | 99 {6, 2}, |
| 100 {0, 3}}} | 100 {0, 3}}} |
| 101 } | 101 } |
| 102 }; | 102 }; |
| 103 | 103 |
| 104 const size_t quadraticTests_count = SK_ARRAY_COUNT(quadraticTests); | 104 const size_t quadraticTests_count = SK_ARRAY_COUNT(quadraticTests); |
| OLD | NEW |