diff options
| author | John Reck <jreck@google.com> | 2015-02-19 14:36:50 -0800 |
|---|---|---|
| committer | John Reck <jreck@google.com> | 2015-03-18 14:22:01 -0700 |
| commit | 2614bd225f84f7a23e6b30fc6b47bede153e5f4c (patch) | |
| tree | ee9a807f2fd740b33410f8e540af95972d12fde0 /libs/hwui/renderthread/DrawFrameTask.cpp | |
| parent | 0d756f7d5646f84753a3db5f702f4ac79bda22bf (diff) | |
| download | frameworks_base-2614bd225f84f7a23e6b30fc6b47bede153e5f4c.zip frameworks_base-2614bd225f84f7a23e6b30fc6b47bede153e5f4c.tar.gz frameworks_base-2614bd225f84f7a23e6b30fc6b47bede153e5f4c.tar.bz2 | |
DO NOT MERGE Backport of limited jank-tracking metrics
Bug: 19821830
Cherry-pick of ba6adf66d3c44c0aa2fd8a224862ff1901d64300
Cherry-pick of e70c5754d01f2ab0ff47ea3eabaa88aca5ed2a36
Change-Id: Id342fa0ab345f204bec58acf45ce72f6de950cfb
Diffstat (limited to 'libs/hwui/renderthread/DrawFrameTask.cpp')
| -rw-r--r-- | libs/hwui/renderthread/DrawFrameTask.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/libs/hwui/renderthread/DrawFrameTask.cpp b/libs/hwui/renderthread/DrawFrameTask.cpp index 97b31a9..23a0202 100644 --- a/libs/hwui/renderthread/DrawFrameTask.cpp +++ b/libs/hwui/renderthread/DrawFrameTask.cpp @@ -34,8 +34,6 @@ namespace renderthread { DrawFrameTask::DrawFrameTask() : mRenderThread(NULL) , mContext(NULL) - , mFrameTimeNanos(0) - , mRecordDurationNanos(0) , mDensity(1.0f) // safe enough default , mSyncResult(kSync_OK) { } @@ -68,18 +66,12 @@ void DrawFrameTask::removeLayerUpdate(DeferredLayerUpdater* layer) { } } -int DrawFrameTask::drawFrame(nsecs_t frameTimeNanos, nsecs_t recordDurationNanos) { +int DrawFrameTask::drawFrame() { 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; - return mSyncResult; } @@ -93,7 +85,7 @@ void DrawFrameTask::run() { ATRACE_NAME("DrawFrame"); mContext->profiler().setDensity(mDensity); - mContext->profiler().startFrame(mRecordDurationNanos); + mContext->profiler().startFrame(); bool canUnblockUiThread; bool canDrawThisFrame; @@ -122,7 +114,7 @@ void DrawFrameTask::run() { bool DrawFrameTask::syncFrameState(TreeInfo& info) { ATRACE_CALL(); - mRenderThread->timeLord().vsyncReceived(mFrameTimeNanos); + mRenderThread->timeLord().vsyncReceived(mFrameInfo[FrameInfoIndex::kVsync]); mContext->makeCurrent(); Caches::getInstance().textureCache.resetMarkInUse(); @@ -130,7 +122,7 @@ bool DrawFrameTask::syncFrameState(TreeInfo& info) { mContext->processLayerUpdate(mLayers[i].get()); } mLayers.clear(); - mContext->prepareTree(info); + mContext->prepareTree(info, mFrameInfo); // This is after the prepareTree so that any pending operations // (RenderNode tree state, prefetched layers, etc...) will be flushed. |
