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 | 9 |
10 static void testSimplifyQuadsMain(PathOpsThreadState* data) | 10 static void testSimplifyQuadsMain(PathOpsThreadState* data) |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 outputProgress(state.fPathStr, pathStr, SkPath::kEvenOdd
_FillType); | 67 outputProgress(state.fPathStr, pathStr, SkPath::kEvenOdd
_FillType); |
68 } | 68 } |
69 testSimplify(path, true, out, state, pathStr); | 69 testSimplify(path, true, out, state, pathStr); |
70 } | 70 } |
71 } | 71 } |
72 } | 72 } |
73 } | 73 } |
74 } | 74 } |
75 | 75 |
76 DEF_TEST(PathOpsSimplifyQuadsThreaded, reporter) { | 76 DEF_TEST(PathOpsSimplifyQuadsThreaded, reporter) { |
77 initializeTests(reporter, "testQuads"); | 77 int threadCount = initializeTests(reporter, "testQuads"); |
78 PathOpsThreadedTestRunner testRunner(reporter); | 78 PathOpsThreadedTestRunner testRunner(reporter, threadCount); |
79 int a = 0; | 79 int a = 0; |
80 for (; a < 16; ++a) { | 80 for (; a < 16; ++a) { |
81 for (int b = a ; b < 16; ++b) { | 81 for (int b = a ; b < 16; ++b) { |
82 for (int c = b ; c < 16; ++c) { | 82 for (int c = b ; c < 16; ++c) { |
83 for (int d = c; d < 16; ++d) { | 83 for (int d = c; d < 16; ++d) { |
84 *testRunner.fRunnables.append() = SkNEW_ARGS(PathOpsThreaded
Runnable, | 84 *testRunner.fRunnables.append() = SkNEW_ARGS(PathOpsThreaded
Runnable, |
85 (&testSimplifyQuadsMain, a, b, c, d, &testRunner)); | 85 (&testSimplifyQuadsMain, a, b, c, d, &testRunner)); |
86 } | 86 } |
87 if (!reporter->allowExtendedTest()) goto finish; | 87 if (!reporter->allowExtendedTest()) goto finish; |
88 } | 88 } |
89 } | 89 } |
90 } | 90 } |
91 finish: | 91 finish: |
92 testRunner.render(); | 92 testRunner.render(); |
93 ShowTestArray(); | 93 ShowTestArray(); |
94 } | 94 } |
OLD | NEW |