diff options
author | John Reck <jreck@google.com> | 2014-05-23 17:42:28 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2014-05-29 15:00:29 -0700 |
commit | fe5e7b7346a54537b980796ceeca66bfdbd05561 (patch) | |
tree | 4036571ea103cd41fbd5fe3a805191c1bef9898c /libs/hwui/renderthread/DrawFrameTask.cpp | |
parent | 45d01929291eba56e1bce582192941446b86bf5a (diff) |
Enable debug stuffs
Bug: 14596762
* dumpsys gfxinfo implemented
* profile GPU visual_bars implemented
Change-Id: Icb948a9d5af5989b5615504d0d76ade64b93ef5b
Diffstat (limited to 'libs/hwui/renderthread/DrawFrameTask.cpp')
-rw-r--r-- | libs/hwui/renderthread/DrawFrameTask.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libs/hwui/renderthread/DrawFrameTask.cpp b/libs/hwui/renderthread/DrawFrameTask.cpp index ee3e059908d0..7ea358fc476e 100644 --- a/libs/hwui/renderthread/DrawFrameTask.cpp +++ b/libs/hwui/renderthread/DrawFrameTask.cpp @@ -34,6 +34,8 @@ DrawFrameTask::DrawFrameTask() : mRenderThread(NULL) , mContext(NULL) , mFrameTimeNanos(0) + , mRecordDurationNanos(0) + , mDensity(1.0f) // safe enough default , mSyncResult(kSync_OK) { } @@ -64,15 +66,17 @@ void DrawFrameTask::setDirty(int left, int top, int right, int bottom) { mDirty.set(left, top, right, bottom); } -int DrawFrameTask::drawFrame(nsecs_t frameTimeNanos) { +int DrawFrameTask::drawFrame(nsecs_t frameTimeNanos, nsecs_t recordDurationNanos) { LOG_ALWAYS_FATAL_IF(!mContext, "Cannot drawFrame with no CanvasContext!"); mSyncResult = kSync_OK; mFrameTimeNanos = frameTimeNanos; + mRecordDurationNanos = recordDurationNanos; postAndWait(); // Reset the single-frame data mFrameTimeNanos = 0; + mRecordDurationNanos = 0; mDirty.setEmpty(); return mSyncResult; @@ -87,6 +91,9 @@ void DrawFrameTask::postAndWait() { void DrawFrameTask::run() { ATRACE_NAME("DrawFrame"); + mContext->profiler().setDensity(mDensity); + mContext->profiler().startFrame(mRecordDurationNanos); + bool canUnblockUiThread; bool canDrawThisFrame; { |