caryclark@google.com | 66089e4 | 2013-04-10 15:55:37 +0000 | [diff] [blame] | 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 "PathOpsExtendedTest.h" |
| 9 | #include "PathOpsThreadedCommon.h" |
mtklein | 406654b | 2014-09-03 15:34:37 -0700 | [diff] [blame] | 10 | #include "SkTaskGroup.h" |
caryclark@google.com | 66089e4 | 2013-04-10 15:55:37 +0000 | [diff] [blame] | 11 | |
| 12 | PathOpsThreadedTestRunner::~PathOpsThreadedTestRunner() { |
| 13 | for (int index = 0; index < fRunnables.count(); index++) { |
halcanary | 385fe4d | 2015-08-26 13:07:48 -0700 | [diff] [blame] | 14 | delete fRunnables[index]; |
caryclark@google.com | 66089e4 | 2013-04-10 15:55:37 +0000 | [diff] [blame] | 15 | } |
| 16 | } |
| 17 | |
| 18 | void PathOpsThreadedTestRunner::render() { |
mtklein | 279c786 | 2016-01-04 19:13:19 -0800 | [diff] [blame] | 19 | SkTaskGroup().batch(fRunnables.count(), [&](int i) { |
mtklein | 048494c | 2016-02-16 19:06:15 -0800 | [diff] [blame] | 20 | (*fRunnables[i])(); |
mtklein | 00b621c | 2015-06-17 15:26:15 -0700 | [diff] [blame] | 21 | }); |
caryclark@google.com | 66089e4 | 2013-04-10 15:55:37 +0000 | [diff] [blame] | 22 | } |