| 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;
|
|
|