diff options
| author | 2022-03-15 19:35:45 +0800 | |
|---|---|---|
| committer | 2022-03-15 19:56:10 +0800 | |
| commit | 06d9139e8c056ff29ce3fd1d0952ec1133aae4ad (patch) | |
| tree | ef106c4aef886e44df61c9c08899c46e17c3a1c3 | |
| parent | 4ab407e5fe315ff4deddc96396d3d5c1f7d6877f (diff) | |
Add postAndWait() trace for calculating frame drawing time
postAndWait() shows the duration that UI Thread waits for RenderThread.
The trace is helpful for perfetto parser to calculate the actual frame
drawing time from CPU resource perspective.
Bug: 224653682
Test: capture trace and check App UI Thread.
Change-Id: Ic3a11b60abb1fea8cc7b44ce6889ab1e3c2788fd
| -rw-r--r-- | libs/hwui/renderthread/DrawFrameTask.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/DrawFrameTask.cpp b/libs/hwui/renderthread/DrawFrameTask.cpp index 8c98c723dbb3..2357dfec72a6 100644 --- a/libs/hwui/renderthread/DrawFrameTask.cpp +++ b/libs/hwui/renderthread/DrawFrameTask.cpp @@ -133,6 +133,7 @@ int DrawFrameTask::drawFrame() { } void DrawFrameTask::postAndWait() { + ATRACE_CALL(); AutoMutex _lock(mLock); mRenderThread->queue().post([this]() { run(); }); mSignal.wait(mLock); |