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

Side by Side Diff: src/core/SkTaskGroup.h

Issue 1369333004: Move SkAtomics.h to private. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « src/core/SkTLS.cpp ('k') | src/core/SkTraceEvent.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 #include "SkTypes.h" 11 #include "SkTypes.h"
12 #include "SkAtomics.h" 12 #include "../private/SkAtomics.h"
13 #include "SkTemplates.h" 13 #include "SkTemplates.h"
14 14
15 struct SkRunnable; 15 struct SkRunnable;
16 16
17 class SkTaskGroup : SkNoncopyable { 17 class SkTaskGroup : SkNoncopyable {
18 public: 18 public:
19 // Create one of these in main() to enable SkTaskGroups globally. 19 // Create one of these in main() to enable SkTaskGroups globally.
20 struct Enabler : SkNoncopyable { 20 struct Enabler : SkNoncopyable {
21 explicit Enabler(int threads = -1); // Default is system-reported core count. 21 explicit Enabler(int threads = -1); // Default is system-reported core count.
22 ~Enabler(); 22 ~Enabler();
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 void(*run_chunk)(Chunk*) = [](Chunk* c) { 83 void(*run_chunk)(Chunk*) = [](Chunk* c) {
84 for (int i = c->start; i < c->end; i++) { 84 for (int i = c->start; i < c->end; i++) {
85 (*c->f)(i); 85 (*c->f)(i);
86 } 86 }
87 }; 87 };
88 SkTaskGroup().batch(run_chunk, chunks.get(), nchunks); 88 SkTaskGroup().batch(run_chunk, chunks.get(), nchunks);
89 } 89 }
90 90
91 #endif//SkTaskGroup_DEFINED 91 #endif//SkTaskGroup_DEFINED
OLDNEW
« no previous file with comments | « src/core/SkTLS.cpp ('k') | src/core/SkTraceEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698