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

Side by Side Diff: tests/PathOpsSimplifyQuadThreadedTest.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 static void testSimplifyQuadsMain(PathOpsThreadState* data) 10 static void testSimplifyQuadsMain(PathOpsThreadState* data)
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 outputProgress(state.fPathStr, pathStr, SkPath::kEvenOdd_Fil lType); 61 outputProgress(state.fPathStr, pathStr, SkPath::kEvenOdd_Fil lType);
62 testSimplify(path, true, out, state, pathStr); 62 testSimplify(path, true, out, state, pathStr);
63 } 63 }
64 } 64 }
65 } 65 }
66 } 66 }
67 } 67 }
68 68
69 static void PathOpsSimplifyQuadsThreadedTest(skiatest::Reporter* reporter) 69 static void PathOpsSimplifyQuadsThreadedTest(skiatest::Reporter* reporter)
70 { 70 {
71 int threadCount = initializeTests("testQuads"); 71 int threadCount = initializeTests(reporter, "testQuads");
72 PathOpsThreadedTestRunner testRunner(reporter, threadCount); 72 PathOpsThreadedTestRunner testRunner(reporter, threadCount);
73 int a = 0; 73 int a = 0;
74 for (; a < 16; ++a) { 74 for (; a < 16; ++a) {
75 for (int b = a ; b < 16; ++b) { 75 for (int b = a ; b < 16; ++b) {
76 for (int c = b ; c < 16; ++c) { 76 for (int c = b ; c < 16; ++c) {
77 for (int d = c; d < 16; ++d) { 77 for (int d = c; d < 16; ++d) {
78 *testRunner.fRunnables.append() = SkNEW_ARGS(PathOpsThreaded Runnable, 78 *testRunner.fRunnables.append() = SkNEW_ARGS(PathOpsThreaded Runnable,
79 (&testSimplifyQuadsMain, a, b, c, d, &testRunner)); 79 (&testSimplifyQuadsMain, a, b, c, d, &testRunner));
80 } 80 }
81 if (!reporter->allowExtendedTest()) goto finish; 81 if (!reporter->allowExtendedTest()) goto finish;
82 } 82 }
83 } 83 }
84 } 84 }
85 finish: 85 finish:
86 testRunner.render(); 86 testRunner.render();
87 } 87 }
88 88
89 #include "TestClassDef.h" 89 #include "TestClassDef.h"
90 DEFINE_TESTCLASS_SHORT(PathOpsSimplifyQuadsThreadedTest) 90 DEFINE_TESTCLASS_SHORT(PathOpsSimplifyQuadsThreadedTest)
OLDNEW
« no previous file with comments | « tests/PathOpsSimplifyDegenerateThreadedTest.cpp ('k') | tests/PathOpsSimplifyQuadralateralsThreadedTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698