Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1658)

Unified Diff: tests/PathOpsSkpClipTest.cpp

Issue 371853005: Move threadpool code from include/utils to tools/threadpool. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: gyp Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/PathOpsExtendedTest.cpp ('k') | tests/PathOpsThreadedCommon.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PathOpsSkpClipTest.cpp
diff --git a/tests/PathOpsSkpClipTest.cpp b/tests/PathOpsSkpClipTest.cpp
index da505451da2dd61166ed13372872e03c8d220779..61883bdfdef429e6f0360d3e21b353159ba1e7d7 100755
--- a/tests/PathOpsSkpClipTest.cpp
+++ b/tests/PathOpsSkpClipTest.cpp
@@ -16,7 +16,7 @@
#include "SkString.h"
#include "SkTArray.h"
#include "SkTDArray.h"
-#include "SkThreadPool.h"
+#include "ThreadPool.h"
#include "SkTime.h"
#include "Test.h"
@@ -332,7 +332,7 @@ struct TestRunner {
skiatest::Reporter* fReporter;
};
-class TestRunnable : public SkRunnable {
+class TestRunnable : public Runnable {
public:
virtual void run() SK_OVERRIDE {
SkGraphics::SetTLSFontCacheLimit(1 * 1024 * 1024);
@@ -377,7 +377,7 @@ TestRunner::~TestRunner() {
}
void TestRunner::render() {
- SkThreadPool pool(fNumThreads);
+ ThreadPool pool(fNumThreads);
for (int index = 0; index < fRunnables.count(); ++ index) {
pool.add(fRunnables[index]);
}
@@ -874,7 +874,7 @@ static void encodeFound(skiatest::Reporter* reporter, TestState& state) {
}
}
- int threadCount = reporter->allowThreaded() ? SkThreadPool::kThreadPerCore : 1;
+ int threadCount = reporter->allowThreaded() ? ThreadPool::kThreadPerCore : 1;
TestRunner testRunner(reporter, threadCount);
for (int index = 0; index < state.fPixelWorst.count(); ++index) {
const TestResult& result = state.fPixelWorst[index];
@@ -926,7 +926,7 @@ DEF_TEST(PathOpsSkpClipThreaded, reporter) {
if (!initTest()) {
return;
}
- int threadCount = reporter->allowThreaded() ? SkThreadPool::kThreadPerCore : 1;
+ int threadCount = reporter->allowThreaded() ? ThreadPool::kThreadPerCore : 1;
TestRunner testRunner(reporter, threadCount);
const int firstDirNo = 1;
for (int dirNo = firstDirNo; dirNo <= 100; ++dirNo) {
@@ -1039,7 +1039,7 @@ DEF_TEST(PathOpsSkpClipUberThreaded, reporter) {
if (!buildTests(reporter, firstDirNo, lastDirNo, tests, sorted)) {
return;
}
- int threadCount = reporter->allowThreaded() ? SkThreadPool::kThreadPerCore : 1;
+ int threadCount = reporter->allowThreaded() ? ThreadPool::kThreadPerCore : 1;
TestRunner testRunner(reporter, threadCount);
for (int dirNo = firstDirNo; dirNo <= lastDirNo; ++dirNo) {
SkString dirName = make_in_dir_name(dirNo);
« no previous file with comments | « tests/PathOpsExtendedTest.cpp ('k') | tests/PathOpsThreadedCommon.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698