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