| 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 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 777 #if SK_SUPPORT_GPU | 777 #if SK_SUPPORT_GPU |
| 778 if (FLAGS_abandonGpuContext) { | 778 if (FLAGS_abandonGpuContext) { |
| 779 gGrFactory->abandonContexts(); | 779 gGrFactory->abandonContexts(); |
| 780 } | 780 } |
| 781 if (FLAGS_resetGpuContext || FLAGS_abandonGpuContext) { | 781 if (FLAGS_resetGpuContext || FLAGS_abandonGpuContext) { |
| 782 gGrFactory->destroyContexts(); | 782 gGrFactory->destroyContexts(); |
| 783 } | 783 } |
| 784 #endif | 784 #endif |
| 785 } | 785 } |
| 786 | 786 |
| 787 log->bench("memory_usage", 0,0); |
| 788 log->config("meta"); |
| 789 log->metric("max_rss_mb", sk_tools::getMaxResidentSetSizeMB()); |
| 790 |
| 787 return 0; | 791 return 0; |
| 788 } | 792 } |
| 789 | 793 |
| 790 #if !defined SK_BUILD_FOR_IOS | 794 #if !defined SK_BUILD_FOR_IOS |
| 791 int main(int argc, char** argv) { | 795 int main(int argc, char** argv) { |
| 792 SkCommandLineFlags::Parse(argc, argv); | 796 SkCommandLineFlags::Parse(argc, argv); |
| 793 return nanobench_main(); | 797 return nanobench_main(); |
| 794 } | 798 } |
| 795 #endif | 799 #endif |
| OLD | NEW |