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

Side by Side Diff: dm/DMTaskRunner.h

Issue 540013002: Revert of SkThreadPool ~~> SkTaskGroup (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 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 | « dm/DMTask.cpp ('k') | dm/DMTaskRunner.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #ifndef DMTaskRunner_DEFINED 1 #ifndef DMTaskRunner_DEFINED
2 #define DMTaskRunner_DEFINED 2 #define DMTaskRunner_DEFINED
3 3
4 #include "DMGpuSupport.h" 4 #include "DMGpuSupport.h"
5 #include "SkTDArray.h" 5 #include "SkThreadPool.h"
6 #include "SkTaskGroup.h"
7 #include "SkTypes.h" 6 #include "SkTypes.h"
8 7
8 // TaskRunner runs Tasks on one of two threadpools depending on the need for a G rContextFactory.
9 // It's typically a good idea to run fewer GPU threads than CPU threads (go nuts with those).
10
9 namespace DM { 11 namespace DM {
10 12
11 class CpuTask; 13 class CpuTask;
12 class GpuTask; 14 class GpuTask;
13 15
14 class TaskRunner : SkNoncopyable { 16 class TaskRunner : SkNoncopyable {
15 public: 17 public:
16 TaskRunner() {} 18 explicit TaskRunner(int cpuThreads, int gpuThreads);
17 19
18 void add(CpuTask* task); 20 void add(CpuTask* task);
21 void addNext(CpuTask* task);
19 void add(GpuTask* task); 22 void add(GpuTask* task);
20 void wait(); 23 void wait();
21 24
22 private: 25 private:
23 SkTaskGroup fCpuWork; 26 SkTThreadPool<void> fCpu;
24 SkTDArray<GpuTask*> fGpuWork; 27 SkTThreadPool<GrContextFactory> fGpu;
25 }; 28 };
26 29
27 } // namespace DM 30 } // namespace DM
28 31
29 #endif // DMTaskRunner_DEFINED 32 #endif // DMTaskRunner_DEFINED
OLDNEW
« no previous file with comments | « dm/DMTask.cpp ('k') | dm/DMTaskRunner.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698