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

Unified Diff: dm/DM.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, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « bench/SkGlyphCacheBench.cpp ('k') | samplecode/SamplePathFuzz.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DM.cpp
diff --git a/dm/DM.cpp b/dm/DM.cpp
index ac37aeb09fd06a9b98a80d673ab4a5abf73b0b22..ace49076ac74427c58486d13e43ea4acf59aeed1 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -1093,12 +1093,13 @@ int dm_main() {
}
SkTaskGroup tg;
- tg.batch([](int i){ run_test(&gThreadedTests[i]); }, gThreadedTests.count());
+ tg.batch(gThreadedTests.count(), [](int i){ run_test(&gThreadedTests[i]); });
for (int i = 0; i < kNumEnclaves; i++) {
SkTArray<Task>* currentEnclave = &enclaves[i];
switch(i) {
case kAnyThread_Enclave:
- tg.batch([currentEnclave](int j) { Task::Run(&(*currentEnclave)[j]); }, currentEnclave->count());
+ tg.batch(currentEnclave->count(),
+ [currentEnclave](int j) { Task::Run(&(*currentEnclave)[j]); });
break;
case kGPU_Enclave:
tg.add([currentEnclave](){ run_enclave_and_gpu_tests(currentEnclave); });
« no previous file with comments | « bench/SkGlyphCacheBench.cpp ('k') | samplecode/SamplePathFuzz.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698