Index: src/core/SkTaskGroup.cpp |
diff --git a/src/core/SkTaskGroup.cpp b/src/core/SkTaskGroup.cpp |
index 2ae1b5997128d514d97ce7693a60816061065941..7a58c865a730a0e2ed7cae6b4f201779c5b09c2b 100644 |
--- a/src/core/SkTaskGroup.cpp |
+++ b/src/core/SkTaskGroup.cpp |
@@ -14,25 +14,25 @@ |
#include "SkThreadUtils.h" |
#if defined(SK_BUILD_FOR_WIN32) |
- static void query_num_cores(int* num_cores) { |
+ static void query_num_cores(int* cores) { |
SYSTEM_INFO sysinfo; |
GetNativeSystemInfo(&sysinfo); |
- *num_cores = sysinfo.dwNumberOfProcessors; |
+ *cores = sysinfo.dwNumberOfProcessors; |
} |
#else |
#include <unistd.h> |
- static void query_num_cores(int* num_cores) { |
- *num_cores = (int)sysconf(_SC_NPROCESSORS_ONLN); |
+ static void query_num_cores(int* cores) { |
+ *cores = (int)sysconf(_SC_NPROCESSORS_ONLN); |
} |
#endif |
-int sk_num_cores() { |
- // We cache sk_num_cores() so we only query the OS once. |
- static int num_cores = 0; |
+static int num_cores() { |
+ // We cache num_cores() so we only query the OS once. |
+ static int cores = 0; |
static SkOnce once; |
- once(query_num_cores, &num_cores); |
- SkASSERT(num_cores > 0); |
- return num_cores; |
+ once(query_num_cores, &cores); |
+ SkASSERT(cores > 0); |
+ return cores; |
} |
namespace { |
@@ -98,7 +98,7 @@ private: |
explicit ThreadPool(int threads) { |
if (threads == -1) { |
- threads = sk_num_cores(); |
+ threads = num_cores(); |
} |
for (int i = 0; i < threads; i++) { |
fThreads.push(new SkThread(&ThreadPool::Loop, this)); |