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

Side by Side Diff: tests/PathOpsSimplifyQuadralateralsThreadedTest.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
« no previous file with comments | « tests/PathOpsSimplifyQuadThreadedTest.cpp ('k') | tests/PathOpsSimplifyRectThreadedTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 testSimplifyQuadralateralsMain(PathOpsThreadState* data) 10 static void testSimplifyQuadralateralsMain(PathOpsThreadState* data)
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 path.setFillType(SkPath::kEvenOdd_FillType); 62 path.setFillType(SkPath::kEvenOdd_FillType);
63 outputProgress(state.fPathStr, pathStr, SkPath::kEvenOdd_Fil lType); 63 outputProgress(state.fPathStr, pathStr, SkPath::kEvenOdd_Fil lType);
64 testSimplify(path, true, out, state, pathStr); 64 testSimplify(path, true, out, state, pathStr);
65 } 65 }
66 } 66 }
67 } 67 }
68 } 68 }
69 } 69 }
70 70
71 static void PathOpsSimplifyQuadralateralsThreadedTest(skiatest::Reporter* report er) { 71 static void PathOpsSimplifyQuadralateralsThreadedTest(skiatest::Reporter* report er) {
72 int threadCount = initializeTests("testQuadralaterals"); 72 int threadCount = initializeTests(reporter, "testQuadralaterals");
73 PathOpsThreadedTestRunner testRunner(reporter, threadCount); 73 PathOpsThreadedTestRunner testRunner(reporter, threadCount);
74 for (int a = 0; a < 16; ++a) { 74 for (int a = 0; 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 (&testSimplifyQuadralateralsMain, a, b, c, d, &testR unner)); 79 (&testSimplifyQuadralateralsMain, a, b, c, d, &testR unner));
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(PathOpsSimplifyQuadralateralsThreadedTest) 90 DEFINE_TESTCLASS_SHORT(PathOpsSimplifyQuadralateralsThreadedTest)
OLDNEW
« no previous file with comments | « tests/PathOpsSimplifyQuadThreadedTest.cpp ('k') | tests/PathOpsSimplifyRectThreadedTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698