summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author John Reck <jreck@google.com> 2016-04-08 15:09:24 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2016-04-08 15:09:26 +0000
commit4a735441e82207e18036be09d0d02c855930938f (patch)
tree90c9ce594962f8e02988954d500c580d4bf9ed79
parent1d16d773b0d2d12301bda68d15adc6953ce68710 (diff)
parenta41f2445156fe0bcfde6bd4d813dfc43796a526d (diff)
Merge "Fix a derp" into nyc-dev
-rw-r--r--libs/hwui/renderthread/RenderProxy.cpp11
-rw-r--r--libs/hwui/renderthread/RenderProxy.h8
-rw-r--r--libs/hwui/tests/macrobench/TestSceneRunner.cpp2
3 files changed, 12 insertions, 9 deletions
diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp
index 2e99d0bcb50d..1116383e4eab 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,
@@ -425,6 +417,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 97194fe6c6a6..ecc296b4738e 100644
--- a/libs/hwui/renderthread/RenderProxy.h
+++ b/libs/hwui/renderthread/RenderProxy.h
@@ -50,6 +50,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 cc0fdd5537d2..c5af06160b62 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);
}