Chromium Code Reviews| Index: dm/DM.cpp |
| diff --git a/dm/DM.cpp b/dm/DM.cpp |
| index 4df4f5861b09b42372a70ff0ef81757b21c98a24..05df71fa9fccaff6ef948c88d1928b95732e2ecd 100644 |
| --- a/dm/DM.cpp |
| +++ b/dm/DM.cpp |
| @@ -1108,17 +1108,20 @@ int dm_main() { |
| } |
| SkTaskGroup tg; |
| - tg.batch(run_test, gThreadedTests.begin(), gThreadedTests.count()); |
| + tg.batch([](int i){ run_test(&gThreadedTests[i]); }, gThreadedTests.count()); |
| for (int i = 0; i < kNumEnclaves; i++) { |
| + SkTArray<Task>* currentEnclave = &enclaves[i]; |
| switch(i) { |
| - case kAnyThread_Enclave: |
| - tg.batch(Task::Run, enclaves[i].begin(), enclaves[i].count()); |
| + case kAnyThread_Enclave: { |
| + Task *t = currentEnclave->begin(); |
| + tg.batch([t](int j) { Task::Run(&t[j]); }, currentEnclave->count()); |
|
mtklein
2015/12/10 20:58:35
Seems like "Task* t" doesn't need to exist?
SkT
herb_g
2015/12/10 21:58:35
Done
|
| + } |
| break; |
| case kGPU_Enclave: |
| - tg.add(run_enclave_and_gpu_tests, &enclaves[i]); |
| + tg.add([currentEnclave](){ run_enclave_and_gpu_tests(currentEnclave); }); |
| break; |
| default: |
| - tg.add(run_enclave, &enclaves[i]); |
| + tg.add([currentEnclave](){ run_enclave(currentEnclave); }); |
| break; |
| } |
| } |
| @@ -1174,7 +1177,6 @@ void call_test(TestWithGrContextAndGLContext test, skiatest::Reporter* reporter, |
| #endif |
| } // namespace |
| - |
| template<typename T> |
| void RunWithGPUTestContexts(T test, GPUTestContexts testContexts, Reporter* reporter, |
| GrContextFactory* factory) { |