| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "PathOpsExtendedTest.h" | 8 #include "PathOpsExtendedTest.h" |
| 9 #include "PathOpsThreadedCommon.h" | 9 #include "PathOpsThreadedCommon.h" |
| 10 | 10 |
| 11 PathOpsThreadedTestRunner::~PathOpsThreadedTestRunner() { | 11 PathOpsThreadedTestRunner::~PathOpsThreadedTestRunner() { |
| 12 for (int index = 0; index < fRunnables.count(); index++) { | 12 for (int index = 0; index < fRunnables.count(); index++) { |
| 13 SkDELETE(fRunnables[index]); | 13 SkDELETE(fRunnables[index]); |
| 14 } | 14 } |
| 15 } | 15 } |
| 16 | 16 |
| 17 void PathOpsThreadedTestRunner::render() { | 17 void PathOpsThreadedTestRunner::render() { |
| 18 fCountdown.reset(fRunnables.count()); | 18 SkThreadPool pool(fNumThreads); |
| 19 for (int index = 0; index < fRunnables.count(); ++ index) { | 19 for (int index = 0; index < fRunnables.count(); ++ index) { |
| 20 fThreadPool.add(fRunnables[index]); | 20 pool.add(fRunnables[index]); |
| 21 } | 21 } |
| 22 fCountdown.wait(); | |
| 23 #ifdef SK_DEBUG | 22 #ifdef SK_DEBUG |
| 24 gDebugMaxWindSum = SK_MaxS32; | 23 gDebugMaxWindSum = SK_MaxS32; |
| 25 gDebugMaxWindValue = SK_MaxS32; | 24 gDebugMaxWindValue = SK_MaxS32; |
| 26 #endif | 25 #endif |
| 27 } | 26 } |
| OLD | NEW |