Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(256)

Side by Side Diff: tests/PathOpsSimplifyRectThreadedTest.cpp

Issue 14002007: allow tests to optionally use multiple threads (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 // four rects, of four sizes 10 // four rects, of four sizes
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 } 166 }
167 } 167 }
168 } 168 }
169 } 169 }
170 } 170 }
171 } 171 }
172 } 172 }
173 173
174 static void PathOpsSimplifyRectsThreadedTest(skiatest::Reporter* reporter) 174 static void PathOpsSimplifyRectsThreadedTest(skiatest::Reporter* reporter)
175 { 175 {
176 int threadCount = initializeTests("testLine"); 176 int threadCount = initializeTests(reporter, "testLine");
177 PathOpsThreadedTestRunner testRunner(reporter, threadCount); 177 PathOpsThreadedTestRunner testRunner(reporter, threadCount);
178 for (int a = 0; a < 8; ++a) { // outermost 178 for (int a = 0; a < 8; ++a) { // outermost
179 for (int b = a ; b < 8; ++b) { 179 for (int b = a ; b < 8; ++b) {
180 for (int c = b ; c < 8; ++c) { 180 for (int c = b ; c < 8; ++c) {
181 for (int d = c; d < 8; ++d) { 181 for (int d = c; d < 8; ++d) {
182 *testRunner.fRunnables.append() = SkNEW_ARGS(PathOpsThre adedRunnable, 182 *testRunner.fRunnables.append() = SkNEW_ARGS(PathOpsThre adedRunnable,
183 (&testSimplify4x4RectsMain, a, b, c, d, &testRun ner)); 183 (&testSimplify4x4RectsMain, a, b, c, d, &testRun ner));
184 } 184 }
185 if (!reporter->allowExtendedTest()) goto finish; 185 if (!reporter->allowExtendedTest()) goto finish;
186 } 186 }
187 } 187 }
188 } 188 }
189 finish: 189 finish:
190 testRunner.render(); 190 testRunner.render();
191 } 191 }
192 192
193 #include "TestClassDef.h" 193 #include "TestClassDef.h"
194 DEFINE_TESTCLASS_SHORT(PathOpsSimplifyRectsThreadedTest) 194 DEFINE_TESTCLASS_SHORT(PathOpsSimplifyRectsThreadedTest)
OLDNEW
« no previous file with comments | « tests/PathOpsSimplifyQuadralateralsThreadedTest.cpp ('k') | tests/PathOpsSimplifyTrianglesThreadedTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698