Index: dm/DMTask.cpp |
diff --git a/dm/DMTask.cpp b/dm/DMTask.cpp |
index b7635563094e34279897020133db8be98b736005..2c7cdd79a41ae4f04ca9889ed4510821d63792c3 100644 |
--- a/dm/DMTask.cpp |
+++ b/dm/DMTask.cpp |
@@ -71,12 +71,12 @@ 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(); |
+ if (FLAGS_resetGpuContext) { |
+ factory.destroyContexts(); |
+ } |
} |
SkDELETE(this); |
} |