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

Unified Diff: dm/DMTask.cpp

Issue 398483005: Add --resetGpuContext to both DM and nanobench. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dm/DMGpuSupport.h ('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 54e7df3803a763324992b65b0c808ca2447d56f5..b7635563094e34279897020133db8be98b736005 100644
--- a/dm/DMTask.cpp
+++ b/dm/DMTask.cpp
@@ -4,6 +4,7 @@
DEFINE_bool(cpu, true, "Master switch for running CPU-bound work.");
DEFINE_bool(gpu, true, "Master switch for running GPU-bound work.");
+DEFINE_bool(resetGpuContext, true, "Reset the GrContext before running each task.");
DECLARE_bool(dryRun);
@@ -70,6 +71,9 @@ GpuTask::GpuTask(Reporter* reporter, TaskRunner* taskRunner) : Task(reporter, ta
void GpuTask::run(GrContextFactory& factory) {
if (FLAGS_gpu && !this->shouldSkip()) {
+ if (FLAGS_resetGpuContext) {
+ factory.destroyContexts();
+ }
this->start();
if (!FLAGS_dryRun) this->draw(&factory);
this->finish();
« no previous file with comments | « dm/DMGpuSupport.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698