Merge "Fix a derp" into nyc-dev

am: 4a73544

* commit '4a735441e82207e18036be09d0d02c855930938f':
  Fix a derp

Change-Id: I1975a6ed121ad0ddfc12784c45092c8af3823bdf
This commit is contained in:
John Reck
2016-04-08 15:17:01 +00:00
committed by android-build-merger
3 changed files with 12 additions and 9 deletions

View File

@@ -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;
}

View File

@@ -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

View File

@@ -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);
}