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

Side by Side Diff: tests/PathOpsOpCubicThreadedTest.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/PathOpsExtendedTest.cpp ('k') | tests/PathOpsOpRectThreadedTest.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 testOpCubicsMain(PathOpsThreadState* data) 10 static void testOpCubicsMain(PathOpsThreadState* data)
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 } 52 }
53 } 53 }
54 } 54 }
55 } 55 }
56 } 56 }
57 } 57 }
58 } 58 }
59 59
60 static void PathOpsOpCubicsThreadedTest(skiatest::Reporter* reporter) 60 static void PathOpsOpCubicsThreadedTest(skiatest::Reporter* reporter)
61 { 61 {
62 int threadCount = initializeTests("cubicOp"); 62 int threadCount = initializeTests(reporter, "cubicOp");
63 PathOpsThreadedTestRunner testRunner(reporter, threadCount); 63 PathOpsThreadedTestRunner testRunner(reporter, threadCount);
64 for (int a = 0; a < 6; ++a) { // outermost 64 for (int a = 0; a < 6; ++a) { // outermost
65 for (int b = a + 1; b < 7; ++b) { 65 for (int b = a + 1; b < 7; ++b) {
66 for (int c = 0 ; c < 6; ++c) { 66 for (int c = 0 ; c < 6; ++c) {
67 for (int d = c + 1; d < 7; ++d) { 67 for (int d = c + 1; d < 7; ++d) {
68 *testRunner.fRunnables.append() = SkNEW_ARGS(PathOpsThreaded Runnable, 68 *testRunner.fRunnables.append() = SkNEW_ARGS(PathOpsThreaded Runnable,
69 (&testOpCubicsMain, a, b, c, d, &testRunner)); 69 (&testOpCubicsMain, a, b, c, d, &testRunner));
70 } 70 }
71 } 71 }
72 if (!reporter->allowExtendedTest()) goto finish; 72 if (!reporter->allowExtendedTest()) goto finish;
73 } 73 }
74 } 74 }
75 finish: 75 finish:
76 testRunner.render(); 76 testRunner.render();
77 } 77 }
78 78
79 #include "TestClassDef.h" 79 #include "TestClassDef.h"
80 DEFINE_TESTCLASS_SHORT(PathOpsOpCubicsThreadedTest) 80 DEFINE_TESTCLASS_SHORT(PathOpsOpCubicsThreadedTest)
OLDNEW
« no previous file with comments | « tests/PathOpsExtendedTest.cpp ('k') | tests/PathOpsOpRectThreadedTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698