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

Side by Side Diff: dm/DMTask.h

Issue 263803003: DM: Push GPU-parent child tasks to the front of the queue. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: share code Created 6 years, 7 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 | « 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 "DMGpuSupport.h" 5 #include "DMGpuSupport.h"
6 #include "SkRunnable.h" 6 #include "SkRunnable.h"
7 #include "SkTime.h" 7 #include "SkTime.h"
8 8
9 // DM will run() these tasks on one of two threadpools. 9 // DM will run() these tasks on one of two threadpools.
10 // Subclasses can call fail() to mark this task as failed, or make any number of spawnChild() calls 10 // Subclasses can call fail() to mark this task as failed, or make any number of spawnChild() calls
(...skipping 18 matching lines...) Expand all
29 29
30 protected: 30 protected:
31 Task(Reporter* reporter, TaskRunner* taskRunner); 31 Task(Reporter* reporter, TaskRunner* taskRunner);
32 Task(const Task& parent); 32 Task(const Task& parent);
33 virtual ~Task() {} 33 virtual ~Task() {}
34 34
35 void start(); 35 void start();
36 void fail(const char* msg = NULL); 36 void fail(const char* msg = NULL);
37 void finish(); 37 void finish();
38 38
39 void reallySpawnChild(CpuTask* task); // For now we don't allow GPU child t asks. 39 void spawnChildNext(CpuTask* task); // For now we don't allow GPU child tas ks.
40 40
41 private: 41 private:
42 Reporter* fReporter; // Unowned. 42 Reporter* fReporter; // Unowned.
43 TaskRunner* fTaskRunner; // Unowned. 43 TaskRunner* fTaskRunner; // Unowned.
44 int fDepth; 44 int fDepth;
45 SkMSec fStart; 45 SkMSec fStart;
46 }; 46 };
47 47
48 class CpuTask : public Task, public SkRunnable { 48 class CpuTask : public Task, public SkRunnable {
49 public: 49 public:
(...skipping 14 matching lines...) Expand all
64 64
65 void run(GrContextFactory&) SK_OVERRIDE; 65 void run(GrContextFactory&) SK_OVERRIDE;
66 virtual void draw(GrContextFactory*) = 0; 66 virtual void draw(GrContextFactory*) = 0;
67 67
68 void spawnChild(CpuTask* task); 68 void spawnChild(CpuTask* task);
69 }; 69 };
70 70
71 } // namespace DM 71 } // namespace DM
72 72
73 #endif // DMTask_DEFINED 73 #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