summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread
diff options
context:
space:
mode:
author Kyle Holm <kholm@google.com> 2024-09-06 15:05:15 -0700
committer Kyle Holm <kholm@google.com> 2024-09-06 22:19:09 +0000
commit0df722f5580a9b9fd1ccc063875b100a45b66c56 (patch)
treea73560a7f533c42b6e16f6e72731b834a53f8b6f /libs/hwui/renderthread
parent6a7b8d724329291f3c362e4a88f3e262ef7cfb87 (diff)
Add a trace to link inputEventId and vsyncId
We should have an easy way to query in a perfetto trace for the frame associated with an input event. This change adds a trace event to do that. Bug: 363076084 Test: https://ui.perfetto.dev/#!/?s=039fa15daa0e4cd005587a64962b5a48f7910cec Verified the new slice has the correct vsyncId and inputEventId. Flag: EXEMPT log only update Change-Id: I2d4e5e439076c94b195cbe328b66d0c988e10661
Diffstat (limited to 'libs/hwui/renderthread')
-rw-r--r--libs/hwui/renderthread/CanvasContext.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index dfda25d013ed..8ec04304a808 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -654,6 +654,9 @@ void CanvasContext::draw(bool solelyTextureViewUpdates) {
if (vsyncId != UiFrameInfoBuilder::INVALID_VSYNC_ID) {
const auto inputEventId =
static_cast<int32_t>(mCurrentFrameInfo->get(FrameInfoIndex::InputEventId));
+ ATRACE_FORMAT(
+ "frameTimelineInfo(frameNumber=%llu, vsyncId=%lld, inputEventId=0x%" PRIx32 ")",
+ frameCompleteNr, vsyncId, inputEventId);
const ANativeWindowFrameTimelineInfo ftl = {
.frameNumber = frameCompleteNr,
.frameTimelineVsyncId = vsyncId,