| 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 testPathOpsRectsMain(PathOpsThreadState* data) | 18 static void testPathOpsRectsMain(PathOpsThreadState* data) |
| 18 { | 19 { |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 testThreadedPathOp(state.fReporter, pathA, pathB, (SkPathOp) op); | 67 testThreadedPathOp(state.fReporter, pathA, pathB, (SkPathOp) op); |
| 67 } | 68 } |
| 68 } | 69 } |
| 69 } | 70 } |
| 70 } | 71 } |
| 71 } | 72 } |
| 72 } | 73 } |
| 73 } | 74 } |
| 74 } | 75 } |
| 75 | 76 |
| 76 static void PathOpsRectsThreadedTest(skiatest::Reporter* reporter) { | 77 DEF_TEST(PathOpsRectsThreaded, reporter) { |
| 77 int threadCount = initializeTests(reporter, "testOp"); | 78 int threadCount = initializeTests(reporter, "testOp"); |
| 78 PathOpsThreadedTestRunner testRunner(reporter, threadCount); | 79 PathOpsThreadedTestRunner testRunner(reporter, threadCount); |
| 79 for (int a = 0; a < 6; ++a) { // outermost | 80 for (int a = 0; a < 6; ++a) { // outermost |
| 80 for (int b = a + 1; b < 7; ++b) { | 81 for (int b = a + 1; b < 7; ++b) { |
| 81 for (int c = 0 ; c < 6; ++c) { | 82 for (int c = 0 ; c < 6; ++c) { |
| 82 for (int d = c + 1; d < 7; ++d) { | 83 for (int d = c + 1; d < 7; ++d) { |
| 83 *testRunner.fRunnables.append() = SkNEW_ARGS(PathOpsThreaded
Runnable, | 84 *testRunner.fRunnables.append() = SkNEW_ARGS(PathOpsThreaded
Runnable, |
| 84 (&testPathOpsRectsMain, a, b, c, d, &testRunner)); | 85 (&testPathOpsRectsMain, a, b, c, d, &testRunner)); |
| 85 } | 86 } |
| 86 } | 87 } |
| 87 if (!reporter->allowExtendedTest()) goto finish; | 88 if (!reporter->allowExtendedTest()) goto finish; |
| 88 } | 89 } |
| 89 } | 90 } |
| 90 finish: | 91 finish: |
| 91 testRunner.render(); | 92 testRunner.render(); |
| 92 } | 93 } |
| 93 | |
| 94 #include "TestClassDef.h" | |
| 95 DEFINE_TESTCLASS_SHORT(PathOpsRectsThreadedTest) | |
| OLD | NEW |