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 "PathOpsExtendedTest.h" | 7 #include "PathOpsExtendedTest.h" |
8 #include "PathOpsThreadedCommon.h" | 8 #include "PathOpsThreadedCommon.h" |
| 9 #include "TestClassDef.h" |
9 | 10 |
10 // four rects, of four sizes | 11 // four rects, of four sizes |
11 // for 3 smaller sizes, tall, wide | 12 // for 3 smaller sizes, tall, wide |
12 // top upper mid lower bottom aligned (3 bits, 5 values) | 13 // top upper mid lower bottom aligned (3 bits, 5 values) |
13 // same with x (3 bits, 5 values) | 14 // same with x (3 bits, 5 values) |
14 // not included, square, tall, wide (2 bits) | 15 // not included, square, tall, wide (2 bits) |
15 // cw or ccw (1 bit) | 16 // cw or ccw (1 bit) |
16 | 17 |
17 static void testSimplify4x4RectsMain(PathOpsThreadState* data) | 18 static void testSimplify4x4RectsMain(PathOpsThreadState* data) |
18 { | 19 { |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 } | 180 } |
180 } | 181 } |
181 } | 182 } |
182 } | 183 } |
183 } | 184 } |
184 } | 185 } |
185 } | 186 } |
186 } | 187 } |
187 } | 188 } |
188 | 189 |
189 static void PathOpsSimplifyRectsThreadedTest(skiatest::Reporter* reporter) | 190 DEF_TEST(PathOpsSimplifyRectsThreaded, reporter) { |
190 { | |
191 int threadCount = initializeTests(reporter, "testLine"); | 191 int threadCount = initializeTests(reporter, "testLine"); |
192 PathOpsThreadedTestRunner testRunner(reporter, threadCount); | 192 PathOpsThreadedTestRunner testRunner(reporter, threadCount); |
193 for (int a = 0; a < 8; ++a) { // outermost | 193 for (int a = 0; a < 8; ++a) { // outermost |
194 for (int b = a ; b < 8; ++b) { | 194 for (int b = a ; b < 8; ++b) { |
195 for (int c = b ; c < 8; ++c) { | 195 for (int c = b ; c < 8; ++c) { |
196 for (int d = c; d < 8; ++d) { | 196 for (int d = c; d < 8; ++d) { |
197 *testRunner.fRunnables.append() = SkNEW_ARGS(PathOpsThre
adedRunnable, | 197 *testRunner.fRunnables.append() = SkNEW_ARGS(PathOpsThre
adedRunnable, |
198 (&testSimplify4x4RectsMain, a, b, c, d, &testRun
ner)); | 198 (&testSimplify4x4RectsMain, a, b, c, d, &testRun
ner)); |
199 } | 199 } |
200 if (!reporter->allowExtendedTest()) goto finish; | 200 if (!reporter->allowExtendedTest()) goto finish; |
201 } | 201 } |
202 } | 202 } |
203 } | 203 } |
204 finish: | 204 finish: |
205 testRunner.render(); | 205 testRunner.render(); |
206 } | 206 } |
207 | |
208 #include "TestClassDef.h" | |
209 DEFINE_TESTCLASS_SHORT(PathOpsSimplifyRectsThreadedTest) | |
OLD | NEW |