diff options
author | 2016-01-04 19:13:19 -0800 | |
---|---|---|
committer | 2016-01-04 19:13:19 -0800 | |
commit | 279c7864090a7b96c34c3594e38ced35967c673f (patch) | |
tree | 3ecd209f1ca5798f6b3d491f9bcd683609b8ca52 /dm | |
parent | c4a0d73e9aebcb7d291aa3eb8d5b6926d9a0b77e (diff) |
If we swap its arguments, SkTaskGroup::batch() _is_ sk_parallel_for.
Why have two names if we can get away with one?
This kills off sk_parallel_for_thread_count(), which was only used to avoid forcing a deadlock in OncePtrTest on multicore machines in singlethreaded mode... a really niche use case. Instead just don't explicitly force a race.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1552093002
Review URL: https://codereview.chromium.org/1552093002
Diffstat (limited to 'dm')
-rw-r--r-- | dm/DM.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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); }); |