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

Side by Side Diff: dm/DMTask.cpp

Issue 389653004: share dm and command flags (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: address comments Created 6 years, 5 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
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698