diff options
Diffstat (limited to 'libs/hwui/tests/macrobench/TestSceneRunner.cpp')
-rw-r--r-- | libs/hwui/tests/macrobench/TestSceneRunner.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/hwui/tests/macrobench/TestSceneRunner.cpp b/libs/hwui/tests/macrobench/TestSceneRunner.cpp index cf9b0c5536fc..9d3b732d75c3 100644 --- a/libs/hwui/tests/macrobench/TestSceneRunner.cpp +++ b/libs/hwui/tests/macrobench/TestSceneRunner.cpp @@ -162,6 +162,11 @@ static void doRun(const TestScene::Info& info, const TestScene::Options& opts, i void run(const TestScene::Info& info, const TestScene::Options& opts, benchmark::BenchmarkReporter* reporter) { + if (opts.reportGpuMemoryUsage) { + // If we're reporting GPU memory usage we need to first start with a clean slate + // All repetitions of the same test will share a single memory usage report + RenderProxy::trimMemory(100); + } BenchmarkResults results; for (int i = 0; i < opts.repeatCount; i++) { doRun(info, opts, i, reporter ? &results : nullptr); @@ -172,4 +177,7 @@ void run(const TestScene::Info& info, const TestScene::Options& opts, // TODO: Report summary } } + if (opts.reportGpuMemoryUsage) { + RenderProxy::dumpGraphicsMemory(STDOUT_FILENO, false); + } } |