blob: 383e47fb90beda7f1da8568a9fe1357f10d8f3f9 [file]
/*
* Copyright 2012 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "src/core/SkTaskGroup.h"
#include "tests/PathOpsThreadedCommon.h"
#include <functional>
PathOpsThreadedTestRunner::~PathOpsThreadedTestRunner() {
for (PathOpsThreadedRunnable* runnable : fRunnables) {
delete runnable;
}
}
void PathOpsThreadedTestRunner::render() {
SkTaskGroup taskGroup;
for (PathOpsThreadedRunnable* runnable : fRunnables) {
taskGroup.add([runnable]() { (*runnable)(); });
}
taskGroup.wait();
}