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

Unified Diff: bench/nanobench.cpp

Issue 394893002: destroyContexts after each bench instead of before (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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/nanobench.cpp
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp
index 69e5de929f7c9e94197b698b44672753b367613b..8f3d4aaf4395d146c98b6da994990a0d08ad9383 100644
--- a/bench/nanobench.cpp
+++ b/bench/nanobench.cpp
@@ -219,9 +219,6 @@ static void create_targets(Benchmark* bench, SkTDArray<Target*>* targets) {
}
#if SK_SUPPORT_GPU
- if (FLAGS_resetGpuContext) {
- gGrFactory.destroyContexts();
- }
#define GPU_TARGET(config, ctxType, info, samples) \
if (Target* t = is_enabled(bench, Benchmark::kGPU_Backend, #config)) { \
@@ -360,6 +357,12 @@ int tool_main(int argc, char** argv) {
}
}
targets.deleteAll();
+
+ #if SK_SUPPORT_GPU
+ if (FLAGS_resetGpuContext) {
+ gGrFactory.destroyContexts();
+ }
+ #endif
}
return 0;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698