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

Side by Side Diff: dm/DMTaskRunner.h

Issue 22839016: Skeleton of DM (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: missed one Created 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 #ifndef DMTaskRunner_DEFINED
2 #define DMTaskRunner_DEFINED
3
4 #include "SkTemplates.h"
5 #include "SkThreadPool.h"
6 #include "SkTypes.h"
7
8 // TaskRunner runs Tasks on one of two threadpools depending on the Task's usesG pu() method.
9 // This lets us drive the GPU with a small number of threads (e.g. 2 or 4 can be faster than 1)
10 // while not swamping it with requests from the full fleet of threads that CPU-b ound tasks run on.
11
12 namespace DM {
13
14 class Task;
15
16 class TaskRunner : SkNoncopyable {
17 public:
18 TaskRunner(int cputhreads, int gpuThreads);
19
20 void add(Task* task);
21 void wait();
22
23 private:
24 SkAutoTDelete<SkThreadPool> fMain, fGpu;
scroggo 2013/10/11 21:20:48 Now that you've added wait() to SkThreadPool, you
mtklein 2013/10/15 18:30:53 Absolutely. Done.
25 };
26
27 } // namespace DM
28
29 #endif // DMTaskRunner_DEFINED
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698