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

Side by Side Diff: tests/PathOpsThreadedCommon.cpp

Issue 1552093002: If we swap its arguments, SkTaskGroup::batch() _is_ sk_parallel_for. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « tests/PathOpsSkpClipTest.cpp ('k') | tests/SkSharedMutexTest.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 7
8 #include "PathOpsExtendedTest.h" 8 #include "PathOpsExtendedTest.h"
9 #include "PathOpsThreadedCommon.h" 9 #include "PathOpsThreadedCommon.h"
10 #include "SkTaskGroup.h" 10 #include "SkTaskGroup.h"
11 11
12 PathOpsThreadedTestRunner::~PathOpsThreadedTestRunner() { 12 PathOpsThreadedTestRunner::~PathOpsThreadedTestRunner() {
13 for (int index = 0; index < fRunnables.count(); index++) { 13 for (int index = 0; index < fRunnables.count(); index++) {
14 delete fRunnables[index]; 14 delete fRunnables[index];
15 } 15 }
16 } 16 }
17 17
18 void PathOpsThreadedTestRunner::render() { 18 void PathOpsThreadedTestRunner::render() {
19 sk_parallel_for(fRunnables.count(), [&](int i) { 19 SkTaskGroup().batch(fRunnables.count(), [&](int i) {
20 fRunnables[i]->run(); 20 fRunnables[i]->run();
21 }); 21 });
22 } 22 }
OLDNEW
« no previous file with comments | « tests/PathOpsSkpClipTest.cpp ('k') | tests/SkSharedMutexTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698