blob: 871792265c4bf5338b7b7c599611490c5c1926f1 [file] [log] [blame]
caryclark@google.com66089e42013-04-10 15:55:37 +00001/*
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
Mike Kleinc0bd9f92019-04-23 12:05:21 -05008#include "src/core/SkTaskGroup.h"
9#include "tests/PathOpsExtendedTest.h"
10#include "tests/PathOpsThreadedCommon.h"
caryclark@google.com66089e42013-04-10 15:55:37 +000011
12PathOpsThreadedTestRunner::~PathOpsThreadedTestRunner() {
13 for (int index = 0; index < fRunnables.count(); index++) {
halcanary385fe4d2015-08-26 13:07:48 -070014 delete fRunnables[index];
caryclark@google.com66089e42013-04-10 15:55:37 +000015 }
16}
17
18void PathOpsThreadedTestRunner::render() {
mtklein279c7862016-01-04 19:13:19 -080019 SkTaskGroup().batch(fRunnables.count(), [&](int i) {
mtklein048494c2016-02-16 19:06:15 -080020 (*fRunnables[i])();
mtklein00b621c2015-06-17 15:26:15 -070021 });
caryclark@google.com66089e42013-04-10 15:55:37 +000022}