From 7e47b3dd7d7f348859f8a23c1abcec8b18d55270 Mon Sep 17 00:00:00 2001 From: Rachel Lee Date: Wed, 12 Jan 2022 14:28:26 -0800 Subject: [PATCH 1/2] Use AVsyncId typedef. Test: atest ASurfaceControlTest Bug: 214063411 Change-Id: I5dd6a0e467f3acc46bf4ce65dde0df265b590697 --- native/android/choreographer.cpp | 2 +- native/android/surface_control.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/native/android/choreographer.cpp b/native/android/choreographer.cpp index deee5b173c21..5f18e1a6c451 100644 --- a/native/android/choreographer.cpp +++ b/native/android/choreographer.cpp @@ -67,7 +67,7 @@ size_t AChoreographerFrameCallbackData_getPreferredFrameTimelineIndex( const AChoreographerFrameCallbackData* data) { return AChoreographerFrameCallbackData_routeGetPreferredFrameTimelineIndex(data); } -int64_t AChoreographerFrameCallbackData_getFrameTimelineVsyncId( +AVsyncId AChoreographerFrameCallbackData_getFrameTimelineVsyncId( const AChoreographerFrameCallbackData* data, size_t index) { return AChoreographerFrameCallbackData_routeGetFrameTimelineVsyncId(data, index); } diff --git a/native/android/surface_control.cpp b/native/android/surface_control.cpp index 5b19102334d9..d01a30e52749 100644 --- a/native/android/surface_control.cpp +++ b/native/android/surface_control.cpp @@ -661,7 +661,7 @@ void ASurfaceTransaction_setOnCommit(ASurfaceTransaction* aSurfaceTransaction, v } void ASurfaceTransaction_setFrameTimeline(ASurfaceTransaction* aSurfaceTransaction, - int64_t vsyncId) { + AVsyncId vsyncId) { CHECK_NOT_NULL(aSurfaceTransaction); // TODO(b/210043506): Get start time from platform. ASurfaceTransaction_to_Transaction(aSurfaceTransaction) From 5ad064f0173cb9e9f19ab14537abcba06e28d82b Mon Sep 17 00:00:00 2001 From: Rachel Lee Date: Fri, 14 Jan 2022 15:37:02 -0800 Subject: [PATCH 2/2] Use AVsyncId typedef in hwui. Test: atest hwui_unit_tests Bug: 214063411 Change-Id: I0b5de12d36c7df5e961870d53619af43f7c3ff6d --- libs/hwui/renderthread/RenderThread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/hwui/renderthread/RenderThread.cpp b/libs/hwui/renderthread/RenderThread.cpp index 6755b7c081f4..0d78f5855a29 100644 --- a/libs/hwui/renderthread/RenderThread.cpp +++ b/libs/hwui/renderthread/RenderThread.cpp @@ -117,7 +117,7 @@ void RenderThread::extendedFrameCallback(const AChoreographerFrameCallbackData* RenderThread* rt = reinterpret_cast(data); size_t preferredFrameTimelineIndex = AChoreographerFrameCallbackData_getPreferredFrameTimelineIndex(cbData); - int64_t vsyncId = AChoreographerFrameCallbackData_getFrameTimelineVsyncId( + AVsyncId vsyncId = AChoreographerFrameCallbackData_getFrameTimelineVsyncId( cbData, preferredFrameTimelineIndex); int64_t frameDeadline = AChoreographerFrameCallbackData_getFrameTimelineDeadline( cbData, preferredFrameTimelineIndex);