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

Side by Side Diff: dm/DMTask.h

Issue 76903002: Fix a warning building DM using ninja on Mac. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « no previous file | dm/DMTask.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 DMTask_DEFINED 1 #ifndef DMTask_DEFINED
2 #define DMTask_DEFINED 2 #define DMTask_DEFINED
3 3
4 #include "DMReporter.h" 4 #include "DMReporter.h"
5 #include "SkRunnable.h" 5 #include "SkRunnable.h"
6 #include "SkThreadPool.h" 6 #include "SkThreadPool.h"
7 7
8 // DM will run() these tasks on one of two threadpools, depending on the result 8 // DM will run() these tasks on one of two threadpools, depending on the result
9 // of usesGpu(). The subclasses can call fail() to mark this task as failed, 9 // of usesGpu(). The subclasses can call fail() to mark this task as failed,
10 // or make any number of spawnChild() calls to kick off dependent tasks. 10 // or make any number of spawnChild() calls to kick off dependent tasks.
11 // 11 //
12 // Task deletes itself when run. 12 // Task deletes itself when run.
13 13
14 namespace DM { 14 namespace DM {
15 15
16 class TaskRunner; 16 class TaskRunner;
17 17
18 class Task : public SkRunnable { 18 class Task : public SkRunnable {
19 public: 19 public:
20 Task(Reporter* reporter, TaskRunner* taskRunner); 20 Task(Reporter* reporter, TaskRunner* taskRunner);
21 Task(const Task& that); 21 Task(const Task& that);
22 virtual ~Task(); 22 virtual ~Task();
23 23
24 void run(); 24 void run() SK_OVERRIDE;
25 25
26 virtual void draw() = 0; 26 virtual void draw() = 0;
27 virtual bool usesGpu() const = 0; 27 virtual bool usesGpu() const = 0;
28 virtual bool shouldSkip() const = 0; 28 virtual bool shouldSkip() const = 0;
29 virtual SkString name() const = 0; 29 virtual SkString name() const = 0;
30 30
31 protected: 31 protected:
32 void spawnChild(Task* task); 32 void spawnChild(Task* task);
33 void fail(); 33 void fail();
34 34
35 private: 35 private:
36 // Both unowned. 36 // Both unowned.
37 Reporter* fReporter; 37 Reporter* fReporter;
38 TaskRunner* fTaskRunner; 38 TaskRunner* fTaskRunner;
39
40 typedef SkRunnable INHERITED;
39 }; 41 };
40 42
41 } // namespace DM 43 } // namespace DM
42 44
43 #endif // DMTask_DEFINED 45 #endif // DMTask_DEFINED
OLDNEW
« no previous file with comments | « no previous file | dm/DMTask.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698