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

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: sync up with latest dm 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
« no previous file with comments | « dm/DMReporter.cpp ('k') | dm/DMWriteTask.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 #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
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
OLDNEW
« no previous file with comments | « dm/DMReporter.cpp ('k') | dm/DMWriteTask.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698