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 DEFINE_bool(resetGpuContext, true, "Reset the GrContext before running each task
."); | |
8 | |
9 DECLARE_bool(dryRun); | |
10 | 4 |
11 namespace DM { | 5 namespace DM { |
12 | 6 |
13 Task::Task(Reporter* reporter, TaskRunner* taskRunner) | 7 Task::Task(Reporter* reporter, TaskRunner* taskRunner) |
14 : fReporter(reporter) | 8 : fReporter(reporter) |
15 , fTaskRunner(taskRunner) | 9 , fTaskRunner(taskRunner) |
16 , fDepth(0) { | 10 , fDepth(0) { |
17 fReporter->taskCreated(); | 11 fReporter->taskCreated(); |
18 } | 12 } |
19 | 13 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 SkDELETE(this); | 75 SkDELETE(this); |
82 } | 76 } |
83 | 77 |
84 void GpuTask::spawnChild(CpuTask* task) { | 78 void GpuTask::spawnChild(CpuTask* task) { |
85 // Really spawn a new task so it runs on the CPU threadpool instead of the G
PU one we're on now. | 79 // Really spawn a new task so it runs on the CPU threadpool instead of the G
PU one we're on now. |
86 // It goes on the front of the queue to minimize the time we must hold refer
ence bitmaps in RAM. | 80 // It goes on the front of the queue to minimize the time we must hold refer
ence bitmaps in RAM. |
87 this->spawnChildNext(task); | 81 this->spawnChildNext(task); |
88 } | 82 } |
89 | 83 |
90 } // namespace DM | 84 } // namespace DM |
OLD | NEW |