OLD | NEW |
1 #include "DMTask.h" | 1 #include "DMTask.h" |
2 #include "DMTaskRunner.h" | 2 #include "DMTaskRunner.h" |
3 #include "SkCommandLineFlags.h" | 3 #include "SkCommonFlags.h" |
4 | |
5 DEFINE_bool(cpu, true, "Master switch for running CPU-bound work."); | |
6 DEFINE_bool(gpu, true, "Master switch for running GPU-bound work."); | |
7 | |
8 DECLARE_bool(dryRun); | |
9 | 4 |
10 namespace DM { | 5 namespace DM { |
11 | 6 |
12 Task::Task(Reporter* reporter, TaskRunner* taskRunner) | 7 Task::Task(Reporter* reporter, TaskRunner* taskRunner) |
13 : fReporter(reporter) | 8 : fReporter(reporter) |
14 , fTaskRunner(taskRunner) | 9 , fTaskRunner(taskRunner) |
15 , fDepth(0) { | 10 , fDepth(0) { |
16 fReporter->taskCreated(); | 11 fReporter->taskCreated(); |
17 } | 12 } |
18 | 13 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 SkDELETE(this); | 72 SkDELETE(this); |
78 } | 73 } |
79 | 74 |
80 void GpuTask::spawnChild(CpuTask* task) { | 75 void GpuTask::spawnChild(CpuTask* task) { |
81 // Really spawn a new task so it runs on the CPU threadpool instead of the G
PU one we're on now. | 76 // Really spawn a new task so it runs on the CPU threadpool instead of the G
PU one we're on now. |
82 // It goes on the front of the queue to minimize the time we must hold refer
ence bitmaps in RAM. | 77 // It goes on the front of the queue to minimize the time we must hold refer
ence bitmaps in RAM. |
83 this->spawnChildNext(task); | 78 this->spawnChildNext(task); |
84 } | 79 } |
85 | 80 |
86 } // namespace DM | 81 } // namespace DM |
OLD | NEW |