diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-04-22 15:23:14 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-04-22 15:23:14 +0000 |
commit | 44c661ff151356ba1c49d7942d23aa1507237989 (patch) | |
tree | 7da1eef27134dbd3548686c296df7e1877f7541f /tests/PathOpsExtendedTest.cpp | |
parent | f6212b36b3ea099eaeb4a5ddc51f8b6f001e2d91 (diff) |
Add thread-per-core setting to SkThreadPool.
BUG=
R=scroggo@google.com, caryclark@google.com
Author: mtklein@google.com
Review URL: https://chromiumcodereview.appspot.com/13855009
git-svn-id: http://skia.googlecode.com/svn/trunk@8802 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests/PathOpsExtendedTest.cpp')
-rw-r--r-- | tests/PathOpsExtendedTest.cpp | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/tests/PathOpsExtendedTest.cpp b/tests/PathOpsExtendedTest.cpp index 675918ffdf..c5dbceb0f3 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) { |