diff options
author | Mike Klein <mtklein@google.com> | 2014-07-15 13:40:19 -0400 |
---|---|---|
committer | Mike Klein <mtklein@google.com> | 2014-07-15 13:40:19 -0400 |
commit | 3944a1d2374d2de8622b0192aa080dba6fb92c76 (patch) | |
tree | 8bf7b36e8d3c3a5086dba946d523be824c4b5801 /bench | |
parent | 6238688af0d758660d344ec047243d4efefd6f4d (diff) |
destroyContexts after each bench instead of before
BUG=skia:
Review URL: https://codereview.chromium.org/394893002
Diffstat (limited to 'bench')
-rw-r--r-- | bench/nanobench.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp index 69e5de929f..8f3d4aaf43 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; |