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" |
caryclark@google.com | a5e5592 | 2013-05-07 18:51:31 +0000 | [diff] [blame] | 10 | #include "SkThreadPool.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++) { |
| 14 | SkDELETE(fRunnables[index]); |
| 15 | } |
| 16 | } |
| 17 | |
| 18 | void PathOpsThreadedTestRunner::render() { |
caryclark@google.com | 9515f09 | 2013-04-18 19:50:01 +0000 | [diff] [blame] | 19 | SkThreadPool pool(fNumThreads); |
caryclark@google.com | 66089e4 | 2013-04-10 15:55:37 +0000 | [diff] [blame] | 20 | for (int index = 0; index < fRunnables.count(); ++ index) { |
caryclark@google.com | 9515f09 | 2013-04-18 19:50:01 +0000 | [diff] [blame] | 21 | pool.add(fRunnables[index]); |
caryclark@google.com | 66089e4 | 2013-04-10 15:55:37 +0000 | [diff] [blame] | 22 | } |
caryclark@google.com | 66089e4 | 2013-04-10 15:55:37 +0000 | [diff] [blame] | 23 | #ifdef SK_DEBUG |
caryclark@google.com | 570863f | 2013-09-16 15:55:01 +0000 | [diff] [blame] | 24 | SkPathOpsDebug::gMaxWindSum = SK_MaxS32; |
| 25 | SkPathOpsDebug::gMaxWindValue = SK_MaxS32; |
caryclark@google.com | 66089e4 | 2013-04-10 15:55:37 +0000 | [diff] [blame] | 26 | #endif |
| 27 | } |