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 "SkIntersections.h" | 9 #include "SkIntersections.h" |
10 #include "SkPathOpsLine.h" | 10 #include "SkPathOpsLine.h" |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 state.fReporter->bumpTestCount(); | 104 state.fReporter->bumpTestCount(); |
105 SkDLine line3 = {{{x - h, y - v}, {x + h, y + v}}}; | 105 SkDLine line3 = {{{x - h, y - v}, {x + h, y + v}}}; |
106 testLineIntersect(state.fReporter, quad, line3, x, y); | 106 testLineIntersect(state.fReporter, quad, line3, x, y); |
107 state.fReporter->bumpTestCount(); | 107 state.fReporter->bumpTestCount(); |
108 } | 108 } |
109 } | 109 } |
110 } | 110 } |
111 } | 111 } |
112 | 112 |
113 DEF_TEST(PathOpsQuadLineIntersectionThreaded, reporter) { | 113 DEF_TEST(PathOpsQuadLineIntersectionThreaded, reporter) { |
114 initializeTests(reporter, "testQuadLineIntersect"); | 114 int threadCount = initializeTests(reporter, "testQuadLineIntersect"); |
115 PathOpsThreadedTestRunner testRunner(reporter); | 115 PathOpsThreadedTestRunner testRunner(reporter, threadCount); |
116 for (int a = 0; a < 16; ++a) { | 116 for (int a = 0; a < 16; ++a) { |
117 for (int b = 0 ; b < 16; ++b) { | 117 for (int b = 0 ; b < 16; ++b) { |
118 for (int c = 0 ; c < 16; ++c) { | 118 for (int c = 0 ; c < 16; ++c) { |
119 *testRunner.fRunnables.append() = SkNEW_ARGS(PathOpsThreaded
Runnable, | 119 *testRunner.fRunnables.append() = SkNEW_ARGS(PathOpsThreaded
Runnable, |
120 (&testQuadLineIntersectMain, a, b, c, 0, &testRunner
)); | 120 (&testQuadLineIntersectMain, a, b, c, 0, &testRunner
)); |
121 } | 121 } |
122 if (!reporter->allowExtendedTest()) goto finish; | 122 if (!reporter->allowExtendedTest()) goto finish; |
123 } | 123 } |
124 } | 124 } |
125 finish: | 125 finish: |
126 testRunner.render(); | 126 testRunner.render(); |
127 } | 127 } |
OLD | NEW |