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

Unified Diff: tests/skia_test.cpp

Issue 533393002: Revert of SkThreadPool ~~> SkTaskGroup (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 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/Test.cpp ('k') | tools/flags/SkCommonFlags.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/skia_test.cpp
diff --git a/tests/skia_test.cpp b/tests/skia_test.cpp
index a73b6bae53d67070649eb4c9ff0cf427e005e354..97ac29b0fd3cf03d935b595e7b4374290b51e770 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,6 +54,7 @@
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:
@@ -174,8 +175,7 @@
int32_t failCount = 0;
int skipCount = 0;
- SkTaskGroup::SetThreadCount(FLAGS_threads);
- SkTaskGroup cpuTests;
+ SkThreadPool threadpool(FLAGS_threads);
SkTArray<Test*> gpuTests; // Always passes ownership to an SkTestRunnable
DebugfReporter reporter(toRun);
@@ -186,7 +186,7 @@
} else if (test->isGPUTest()) {
gpuTests.push_back() = test.detach();
} else {
- cpuTests.add(SkNEW_ARGS(SkTestRunnable, (test.detach(), &failCount)));
+ threadpool.add(SkNEW_ARGS(SkTestRunnable, (test.detach(), &failCount)));
}
}
@@ -204,7 +204,7 @@
}
// Block until threaded tests finish.
- cpuTests.wait();
+ threadpool.wait();
if (FLAGS_verbose) {
SkDebugf("\nFinished %d tests, %d failures, %d skipped. (%d internal tests)",
« no previous file with comments | « tests/Test.cpp ('k') | tools/flags/SkCommonFlags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698