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

Side by Side Diff: tests/PathOpsQuadLineIntersectionThreadedTest.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/PathOpsOpRectThreadedTest.cpp ('k') | tests/PathOpsSimplifyDegenerateThreadedTest.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 #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
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)
OLDNEW
« no previous file with comments | « tests/PathOpsOpRectThreadedTest.cpp ('k') | tests/PathOpsSimplifyDegenerateThreadedTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698