Index: src/core/SkTaskGroup.cpp |
diff --git a/src/core/SkTaskGroup.cpp b/src/core/SkTaskGroup.cpp |
index b696555d6faef35394199a1c658ab39990f31649..2ae1b5997128d514d97ce7693a60816061065941 100644 |
--- a/src/core/SkTaskGroup.cpp |
+++ b/src/core/SkTaskGroup.cpp |
@@ -26,11 +26,11 @@ |
} |
#endif |
-// We cache sk_num_cores() so we only query the OS once. |
-SK_DECLARE_STATIC_ONCE(g_query_num_cores_once); |
int sk_num_cores() { |
+ // We cache sk_num_cores() so we only query the OS once. |
static int num_cores = 0; |
- SkOnce(&g_query_num_cores_once, query_num_cores, &num_cores); |
+ static SkOnce once; |
bungeman-skia
2016/04/18 15:19:00
It is not entirely clear to me how using member in
mtklein
2016/04/18 15:27:44
It makes the default constructor for SkOnce conste
|
+ once(query_num_cores, &num_cores); |
SkASSERT(num_cores > 0); |
return num_cores; |
} |