OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "PathOpsTestCommon.h" | 7 #include "PathOpsTestCommon.h" |
8 #include "SkOpSegment.h" | 8 #include "SkOpSegment.h" |
9 #include "SkTArray.h" | 9 #include "SkTArray.h" |
10 #include "Test.h" | 10 #include "Test.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 }; | 55 }; |
56 | 56 |
57 struct SortSet { | 57 struct SortSet { |
58 const SkPoint* ptData; | 58 const SkPoint* ptData; |
59 int ptCount; | 59 int ptCount; |
60 double tStart; | 60 double tStart; |
61 double tEnd; | 61 double tEnd; |
62 SkPoint endPt; | 62 SkPoint endPt; |
63 }; | 63 }; |
64 | 64 |
65 static const SortSet set1[] = { | 65 /*static const SortSet set1[] = { |
66 {cubics[0], 4, 0.66666987081928919, 0.875, {0, 0}}, | 66 {cubics[0], 4, 0.66666987081928919, 0.875, {0, 0}}, |
67 {lines[0], 2, 0.574070336, 0.388888889, {0, 0}}, | 67 {lines[0], 2, 0.574070336, 0.388888889, {0, 0}}, |
68 {cubics[0], 4, 0.66666987081928919, 0.4050371120499307, {0, 0}}, | 68 {cubics[0], 4, 0.66666987081928919, 0.4050371120499307, {0, 0}}, |
69 {lines[0], 2, 0.574070336, 0.9140625, {0, 0}}, | 69 {lines[0], 2, 0.574070336, 0.9140625, {0, 0}}, |
70 }; | 70 }; |
71 | 71 |
72 static const SortSet set1a[] = { | 72 static const SortSet set1a[] = { |
73 {cubics[0], 4, 0.666666667, 0.405037112, {4.58007812f,2.83203125f}}, | 73 {cubics[0], 4, 0.666666667, 0.405037112, {4.58007812f,2.83203125f}}, |
74 {lines[0], 2, 0.574074074, 0.9140625, {4.44444466f,2.77777767f}}, | 74 {lines[0], 2, 0.574074074, 0.9140625, {4.44444466f,2.77777767f}}, |
75 }; | 75 };*/ |
76 | 76 |
77 static const SortSet set2[] = { | 77 static const SortSet set2[] = { |
78 {cubics[0], 4, 0.666666667, 0.875, {0, 0}}, | 78 {cubics[0], 4, 0.666666667, 0.875, {0, 0}}, |
79 {lines[0], 2, 0.574074074, 0.388888889, {0, 0}}, | 79 {lines[0], 2, 0.574074074, 0.388888889, {0, 0}}, |
80 {cubics[0], 4, 0.666666667, 0.405037112, {0, 0}}, | 80 {cubics[0], 4, 0.666666667, 0.405037112, {0, 0}}, |
81 {lines[0], 2, 0.574074074, 0.9140625, {0, 0}}, | 81 {lines[0], 2, 0.574074074, 0.9140625, {0, 0}}, |
82 }; | 82 }; |
83 | 83 |
84 static const SortSet set3[] = { | 84 static const SortSet set3[] = { |
85 {cubics[1], 4, 0, 1, {0, 0}}, | 85 {cubics[1], 4, 0, 1, {0, 0}}, |
86 {quads[0], 3, 1, 0, {0, 0}}, | 86 {quads[0], 3, 1, 0, {0, 0}}, |
87 }; | 87 }; |
88 | 88 |
89 static const SortSet set4[] = { | 89 /*static const SortSet set4[] = { |
90 {cubics[2], 4, 0.812114222, 1, {0, 0}}, | 90 {cubics[2], 4, 0.812114222, 1, {0, 0}}, |
91 {cubics[3], 4, 0.0684734759, 0, {0, 0}}, | 91 {cubics[3], 4, 0.0684734759, 0, {0, 0}}, |
92 }; | 92 };*/ |
93 | 93 |
94 static const SortSet set5[] = { | 94 static const SortSet set5[] = { |
95 {lines[1], 2, 0.777777778, 1, {0, 0}}, | 95 {lines[1], 2, 0.777777778, 1, {0, 0}}, |
96 {quads[1], 3, 1, 4.34137342e-06, {0, 0}}, | 96 {quads[1], 3, 1, 4.34137342e-06, {0, 0}}, |
97 {lines[2], 2, 0, 1, {0, 0}}, | 97 {lines[2], 2, 0, 1, {0, 0}}, |
98 }; | 98 }; |
99 | 99 |
100 static const SortSet set5a[] = { | 100 static const SortSet set5a[] = { |
101 {lines[1], 2, 0.777777778, 1, {306,590}}, | 101 {lines[1], 2, 0.777777778, 1, {306,590}}, |
102 {quads[1], 3, 1, 4.34137342e-06, {304.243195f,591.756775f}}, | 102 {quads[1], 3, 1, 4.34137342e-06, {304.243195f,591.756775f}}, |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 {cubics[13], 4, 0.5, 0.866666667, {0, 0}}, | 176 {cubics[13], 4, 0.5, 0.866666667, {0, 0}}, |
177 }; | 177 }; |
178 | 178 |
179 static const SortSet set14[] = { | 179 static const SortSet set14[] = { |
180 {quads[2], 3, 0.5, 0.310102051, {0, 0}}, | 180 {quads[2], 3, 0.5, 0.310102051, {0, 0}}, |
181 {quads[3], 3, 0.5, 0.2, {0, 0}}, | 181 {quads[3], 3, 0.5, 0.2, {0, 0}}, |
182 {quads[3], 3, 0.5, 0.770156212, {0, 0}}, | 182 {quads[3], 3, 0.5, 0.770156212, {0, 0}}, |
183 {quads[2], 3, 0.5, 0.7, {0, 0}}, | 183 {quads[2], 3, 0.5, 0.7, {0, 0}}, |
184 }; | 184 }; |
185 | 185 |
186 static const SortSet set15[] = { | 186 /*static const SortSet set15[] = { |
187 {cubics[14], 4, 0.93081374, 1, {0, 0}}, | 187 {cubics[14], 4, 0.93081374, 1, {0, 0}}, |
188 {cubics[15], 4, 0.188518131, 0, {0, 0}}, | 188 {cubics[15], 4, 0.188518131, 0, {0, 0}}, |
189 {cubics[14], 4, 0.93081374, 0, {0, 0}}, | 189 {cubics[14], 4, 0.93081374, 0, {0, 0}}, |
190 }; | 190 };*/ |
191 | 191 |
192 static const SortSet set16[] = { | 192 static const SortSet set16[] = { |
193 {cubics[17], 4, 0.0682619216, 0, {130.042755f,11417.4131f}}, | 193 {cubics[17], 4, 0.0682619216, 0, {130.042755f,11417.4131f}}, |
194 {cubics[16], 4, 0.812302088, 1, {130,11417}}, | 194 {cubics[16], 4, 0.812302088, 1, {130,11417}}, |
195 {cubics[17], 4, 0.0682619216, 1, {132,11419}}, | 195 {cubics[17], 4, 0.0682619216, 1, {132,11419}}, |
196 }; | 196 }; |
197 | 197 |
198 static const SortSet set17[] = { | 198 static const SortSet set17[] = { |
199 {lines[11], 2, 0.888889581, 1, {0, 0}}, | 199 {lines[11], 2, 0.888889581, 1, {0, 0}}, |
200 {cubics[18], 4, 0.999996241, 0, {0, 0}}, | 200 {cubics[18], 4, 0.999996241, 0, {0, 0}}, |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 } | 469 } |
470 } | 470 } |
471 #endif | 471 #endif |
472 | 472 |
473 #include "TestClassDef.h" | 473 #include "TestClassDef.h" |
474 DEFINE_TESTCLASS_SHORT(PathOpsAngleTest) | 474 DEFINE_TESTCLASS_SHORT(PathOpsAngleTest) |
475 | 475 |
476 DEFINE_TESTCLASS_SHORT(PathOpsAngleTestOne) | 476 DEFINE_TESTCLASS_SHORT(PathOpsAngleTestOne) |
477 | 477 |
478 // DEFINE_TESTCLASS_SHORT(PathOpsAngleFindSlop) | 478 // DEFINE_TESTCLASS_SHORT(PathOpsAngleFindSlop) |
OLD | NEW |