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

Side by Side Diff: bench/nanobench.cpp

Issue 1030353004: small fix for nanobench segfault when not running any tests (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include <ctype.h> 8 #include <ctype.h>
9 9
10 #include "Benchmark.h" 10 #include "Benchmark.h"
(...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 if (FLAGS_resetGpuContext || FLAGS_abandonGpuContext) { 887 if (FLAGS_resetGpuContext || FLAGS_abandonGpuContext) {
888 gGrFactory->destroyContexts(); 888 gGrFactory->destroyContexts();
889 } 889 }
890 #endif 890 #endif
891 } 891 }
892 892
893 log->bench("memory_usage", 0,0); 893 log->bench("memory_usage", 0,0);
894 log->config("meta"); 894 log->config("meta");
895 log->metric("max_rss_mb", sk_tools::getMaxResidentSetSizeMB()); 895 log->metric("max_rss_mb", sk_tools::getMaxResidentSetSizeMB());
896 896
897 #if SK_SUPPORT_GPU
898 // Make sure we clean up the global GrContextFactory here, otherwise we migh t race with the
899 // SkEventTracer destructor
900 gGrFactory.reset(NULL);
901 #endif
902
897 return 0; 903 return 0;
898 } 904 }
899 905
900 #if !defined SK_BUILD_FOR_IOS 906 #if !defined SK_BUILD_FOR_IOS
901 int main(int argc, char** argv) { 907 int main(int argc, char** argv) {
902 SkCommandLineFlags::Parse(argc, argv); 908 SkCommandLineFlags::Parse(argc, argv);
903 return nanobench_main(); 909 return nanobench_main();
904 } 910 }
905 #endif 911 #endif
OLDNEW
« 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