| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |