blob: a66ec710c7440c043481d6b0be3c2f6468d7efae [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
8#include "PathOpsExtendedTest.h"
9#include "PathOpsThreadedCommon.h"
caryclark@google.coma5e55922013-05-07 18:51:31 +000010#include "SkThreadPool.h"
caryclark@google.com66089e42013-04-10 15:55:37 +000011
12PathOpsThreadedTestRunner::~PathOpsThreadedTestRunner() {
13 for (int index = 0; index < fRunnables.count(); index++) {
14 SkDELETE(fRunnables[index]);
15 }
16}
17
18void PathOpsThreadedTestRunner::render() {
caryclark@google.com9515f092013-04-18 19:50:01 +000019 SkThreadPool pool(fNumThreads);
caryclark@google.com66089e42013-04-10 15:55:37 +000020 for (int index = 0; index < fRunnables.count(); ++ index) {
caryclark@google.com9515f092013-04-18 19:50:01 +000021 pool.add(fRunnables[index]);
caryclark@google.com66089e42013-04-10 15:55:37 +000022 }
caryclark@google.com66089e42013-04-10 15:55:37 +000023#ifdef SK_DEBUG
caryclark@google.com570863f2013-09-16 15:55:01 +000024 SkPathOpsDebug::gMaxWindSum = SK_MaxS32;
25 SkPathOpsDebug::gMaxWindValue = SK_MaxS32;
caryclark@google.com66089e42013-04-10 15:55:37 +000026#endif
27}