xref: /aosp_15_r20/external/skia/tests/PathOpsThreadedCommon.cpp (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1 /*
2  * Copyright 2012 Google Inc.
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7 
8 #include "src/core/SkTaskGroup.h"
9 #include "tests/PathOpsThreadedCommon.h"
10 
11 #include <functional>
12 
~PathOpsThreadedTestRunner()13 PathOpsThreadedTestRunner::~PathOpsThreadedTestRunner() {
14     for (int index = 0; index < fRunnables.size(); index++) {
15         delete fRunnables[index];
16     }
17 }
18 
render()19 void PathOpsThreadedTestRunner::render() {
20     SkTaskGroup().batch(fRunnables.size(), [&](int i) {
21         (*fRunnables[i])();
22     });
23 }
24