| Index: tests/skia_test.cpp
|
| diff --git a/tests/skia_test.cpp b/tests/skia_test.cpp
|
| index 97ac29b0fd3cf03d935b595e7b4374290b51e770..0058215ccfcb7a181b678edefbcdfa4b2ad18d8e 100644
|
| --- a/tests/skia_test.cpp
|
| +++ b/tests/skia_test.cpp
|
| @@ -12,8 +12,8 @@
|
| #include "SkGraphics.h"
|
| #include "SkOSFile.h"
|
| #include "SkTArray.h"
|
| +#include "SkTaskGroup.h"
|
| #include "SkTemplates.h"
|
| -#include "SkThreadPool.h"
|
| #include "SkTime.h"
|
| #include "Test.h"
|
|
|
| @@ -54,7 +54,6 @@ public:
|
| explicit DebugfReporter(int total) : fDone(0), fTotal(total) {}
|
|
|
| virtual bool allowExtendedTest() const SK_OVERRIDE { return FLAGS_extendedTest; }
|
| - virtual bool allowThreaded() const SK_OVERRIDE { return !FLAGS_single; }
|
| virtual bool verbose() const SK_OVERRIDE { return FLAGS_veryVerbose; }
|
|
|
| protected:
|
| @@ -175,7 +174,8 @@ int test_main() {
|
| int32_t failCount = 0;
|
| int skipCount = 0;
|
|
|
| - SkThreadPool threadpool(FLAGS_threads);
|
| + SkTaskGroup::Enabler enabled(FLAGS_threads);
|
| + SkTaskGroup cpuTests;
|
| SkTArray<Test*> gpuTests; // Always passes ownership to an SkTestRunnable
|
|
|
| DebugfReporter reporter(toRun);
|
| @@ -186,7 +186,7 @@ int test_main() {
|
| } else if (test->isGPUTest()) {
|
| gpuTests.push_back() = test.detach();
|
| } else {
|
| - threadpool.add(SkNEW_ARGS(SkTestRunnable, (test.detach(), &failCount)));
|
| + cpuTests.add(SkNEW_ARGS(SkTestRunnable, (test.detach(), &failCount)));
|
| }
|
| }
|
|
|
| @@ -204,7 +204,7 @@ int test_main() {
|
| }
|
|
|
| // Block until threaded tests finish.
|
| - threadpool.wait();
|
| + cpuTests.wait();
|
|
|
| if (FLAGS_verbose) {
|
| SkDebugf("\nFinished %d tests, %d failures, %d skipped. (%d internal tests)",
|
|
|