From a41f2445156fe0bcfde6bd4d813dfc43796a526d Mon Sep 17 00:00:00 2001 From: John Reck Date: Thu, 7 Apr 2016 16:36:57 -0700 Subject: [PATCH] Fix a derp Fixes: 28074465 I knew I added that flag for a reason... Change-Id: I6e28237dcd50191769a828bf2646c3a00c14387c --- libs/hwui/renderthread/RenderProxy.cpp | 11 +++-------- libs/hwui/renderthread/RenderProxy.h | 8 ++++++++ libs/hwui/tests/macrobench/TestSceneRunner.cpp | 2 +- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp index 16dd108488b24..060b83de7427a 100644 --- a/libs/hwui/renderthread/RenderProxy.cpp +++ b/libs/hwui/renderthread/RenderProxy.cpp @@ -52,14 +52,6 @@ namespace renderthread { MethodInvokeRenderTask* task = new MethodInvokeRenderTask((RunnableMethod) Bridge_ ## method); \ ARGS(method) *args = (ARGS(method) *) task->payload() -namespace DumpFlags { - enum { - FrameStats = 1 << 0, - Reset = 1 << 1, - JankStats = 1 << 2, - }; -}; - CREATE_BRIDGE4(createContext, RenderThread* thread, bool translucent, RenderNode* rootRenderNode, IContextFactory* contextFactory) { return new CanvasContext(*args->thread, args->translucent, @@ -422,6 +414,9 @@ CREATE_BRIDGE4(dumpProfileInfo, CanvasContext* context, RenderThread* thread, if (args->dumpFlags & DumpFlags::Reset) { args->context->resetFrameStats(); } + if (args->dumpFlags & DumpFlags::JankStats) { + args->thread->jankTracker().dump(args->fd); + } return nullptr; } diff --git a/libs/hwui/renderthread/RenderProxy.h b/libs/hwui/renderthread/RenderProxy.h index 8d65a8259513b..59c32d30cb9bc 100644 --- a/libs/hwui/renderthread/RenderProxy.h +++ b/libs/hwui/renderthread/RenderProxy.h @@ -49,6 +49,14 @@ class ErrorChannel; class RenderThread; class RenderProxyBridge; +namespace DumpFlags { + enum { + FrameStats = 1 << 0, + Reset = 1 << 1, + JankStats = 1 << 2, + }; +}; + /* * RenderProxy is strictly single threaded. All methods must be invoked on the owning * thread. It is important to note that RenderProxy may be deleted while it has diff --git a/libs/hwui/tests/macrobench/TestSceneRunner.cpp b/libs/hwui/tests/macrobench/TestSceneRunner.cpp index 58c0876cb4cb3..3e48cdac0ae68 100644 --- a/libs/hwui/tests/macrobench/TestSceneRunner.cpp +++ b/libs/hwui/tests/macrobench/TestSceneRunner.cpp @@ -122,5 +122,5 @@ void run(const TestScene::Info& info, const TestScene::Options& opts) { } } - proxy->dumpProfileInfo(STDOUT_FILENO, 0); + proxy->dumpProfileInfo(STDOUT_FILENO, DumpFlags::JankStats); }