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

Unified Diff: tests/PathOpsExtendedTest.cpp

Issue 13855009: Add thread-per-core setting to SkThreadPool. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: missing FOR_ Created 7 years, 8 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 | « src/utils/SkThreadPool.cpp ('k') | tests/skia_test.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PathOpsExtendedTest.cpp
diff --git a/tests/PathOpsExtendedTest.cpp b/tests/PathOpsExtendedTest.cpp
index 675918ffdf6173d51b0d96b80a9e89a1bef163a3..c5dbceb0f38a5bd1efc0bdcdd985ad14a1942be8 100644
--- a/tests/PathOpsExtendedTest.cpp
+++ b/tests/PathOpsExtendedTest.cpp
@@ -513,9 +513,6 @@ bool testPathOp(skiatest::Reporter* reporter, const SkPath& a, const SkPath& b,
return result == 0;
}
-const int maxThreadsAllocated = 64;
-static int maxThreads = 1;
-
int initializeTests(skiatest::Reporter* reporter, const char* test) {
#ifdef SK_DEBUG
gDebugMaxWindSum = 4;
@@ -523,18 +520,6 @@ int initializeTests(skiatest::Reporter* reporter, const char* test) {
#endif
testName = test;
size_t testNameSize = strlen(test);
- if (reporter->allowThreaded()) {
- int threads = -1;
-#ifdef SK_BUILD_FOR_MAC
- size_t size = sizeof(threads);
- sysctlbyname("hw.logicalcpu_max", &threads, &size, NULL, 0);
-#endif
- if (threads > 0) {
- maxThreads = threads;
- } else {
- maxThreads = 16;
- }
- }
SkFILEStream inFile("../../experimental/Intersection/op.htm");
if (inFile.isValid()) {
SkTDArray<char> inData;
@@ -549,7 +534,7 @@ int initializeTests(skiatest::Reporter* reporter, const char* test) {
testNumber = atoi(numLoc) + 1;
}
}
- return maxThreads;
+ return reporter->allowThreaded() ? SkThreadPool::kThreadPerCore : 0;
}
void outputProgress(char* ramStr, const char* pathStr, SkPath::FillType pathFillType) {
« no previous file with comments | « src/utils/SkThreadPool.cpp ('k') | tests/skia_test.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698