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

Unified Diff: dm/DMTask.cpp

Issue 305963007: add --dryRun flag to dm (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dm/DM.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMTask.cpp
diff --git a/dm/DMTask.cpp b/dm/DMTask.cpp
index e32249d410c425e3912e94dbdd2c8f4b96bda810..54e7df3803a763324992b65b0c808ca2447d56f5 100644
--- a/dm/DMTask.cpp
+++ b/dm/DMTask.cpp
@@ -5,6 +5,8 @@
DEFINE_bool(cpu, true, "Master switch for running CPU-bound work.");
DEFINE_bool(gpu, true, "Master switch for running GPU-bound work.");
+DECLARE_bool(dryRun);
+
namespace DM {
Task::Task(Reporter* reporter, TaskRunner* taskRunner)
@@ -51,7 +53,7 @@ CpuTask::CpuTask(const Task& parent) : Task(parent) {}
void CpuTask::run() {
if (FLAGS_cpu && !this->shouldSkip()) {
this->start();
- this->draw();
+ if (!FLAGS_dryRun) this->draw();
this->finish();
}
SkDELETE(this);
@@ -69,7 +71,7 @@ GpuTask::GpuTask(Reporter* reporter, TaskRunner* taskRunner) : Task(reporter, ta
void GpuTask::run(GrContextFactory& factory) {
if (FLAGS_gpu && !this->shouldSkip()) {
this->start();
- this->draw(&factory);
+ if (!FLAGS_dryRun) this->draw(&factory);
this->finish();
}
SkDELETE(this);
« no previous file with comments | « dm/DM.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698