OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkTaskGroup_DEFINED | 8 #ifndef SkTaskGroup_DEFINED |
9 #define SkTaskGroup_DEFINED | 9 #define SkTaskGroup_DEFINED |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 void batch(int N, std::function<void(int)> fn); | 32 void batch(int N, std::function<void(int)> fn); |
33 | 33 |
34 // Block until all Tasks previously add()ed to this SkTaskGroup have run. | 34 // Block until all Tasks previously add()ed to this SkTaskGroup have run. |
35 // You may safely reuse this SkTaskGroup after wait() returns. | 35 // You may safely reuse this SkTaskGroup after wait() returns. |
36 void wait(); | 36 void wait(); |
37 | 37 |
38 private: | 38 private: |
39 SkAtomic<int32_t> fPending; | 39 SkAtomic<int32_t> fPending; |
40 }; | 40 }; |
41 | 41 |
| 42 // Returns best estimate of number of CPU cores available to use. |
| 43 int sk_num_cores(); |
| 44 |
42 #endif//SkTaskGroup_DEFINED | 45 #endif//SkTaskGroup_DEFINED |
OLD | NEW |