From 545adcd1f77b89edc56f94508c5d43bd3edda66a Mon Sep 17 00:00:00 2001 From: Rachel Lee Date: Wed, 12 Jan 2022 17:27:32 -0800 Subject: [PATCH 1/2] Update libandroid renamed AChoreographer methods. Test: atest ChoreographerNativeTest Bug: 214303753 Change-Id: I32d9703c669b2408dddd199c678fca0564668142 --- native/android/choreographer.cpp | 9 +++++---- native/android/libandroid.map.txt | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/native/android/choreographer.cpp b/native/android/choreographer.cpp index deee5b173c214..fbd4b2ec8736e 100644 --- a/native/android/choreographer.cpp +++ b/native/android/choreographer.cpp @@ -71,11 +71,12 @@ int64_t AChoreographerFrameCallbackData_getFrameTimelineVsyncId( const AChoreographerFrameCallbackData* data, size_t index) { return AChoreographerFrameCallbackData_routeGetFrameTimelineVsyncId(data, index); } -int64_t AChoreographerFrameCallbackData_getFrameTimelineExpectedPresentTime( +int64_t AChoreographerFrameCallbackData_getFrameTimelineExpectedPresentTimeNanos( const AChoreographerFrameCallbackData* data, size_t index) { - return AChoreographerFrameCallbackData_routeGetFrameTimelineExpectedPresentTime(data, index); + return AChoreographerFrameCallbackData_routeGetFrameTimelineExpectedPresentTimeNanos(data, + index); } -int64_t AChoreographerFrameCallbackData_getFrameTimelineDeadline( +int64_t AChoreographerFrameCallbackData_getFrameTimelineDeadlineNanos( const AChoreographerFrameCallbackData* data, size_t index) { - return AChoreographerFrameCallbackData_routeGetFrameTimelineDeadline(data, index); + return AChoreographerFrameCallbackData_routeGetFrameTimelineDeadlineNanos(data, index); } diff --git a/native/android/libandroid.map.txt b/native/android/libandroid.map.txt index 3c1aa4409254b..35c794e826950 100644 --- a/native/android/libandroid.map.txt +++ b/native/android/libandroid.map.txt @@ -34,8 +34,8 @@ LIBANDROID { AChoreographerFrameCallbackData_getFrameTimelinesLength; # introduced=33 AChoreographerFrameCallbackData_getPreferredFrameTimelineIndex; # introduced=33 AChoreographerFrameCallbackData_getFrameTimelineVsyncId; # introduced=33 - AChoreographerFrameCallbackData_getFrameTimelineExpectedPresentTime; # introduced=33 - AChoreographerFrameCallbackData_getFrameTimelineDeadline; # introduced=33 + AChoreographerFrameCallbackData_getFrameTimelineExpectedPresentTimeNanos; # introduced=33 + AChoreographerFrameCallbackData_getFrameTimelineDeadlineNanos; # introduced=33 AConfiguration_copy; AConfiguration_delete; AConfiguration_diff; From 3712a2a7c0a8fa19c5ce01b3c8946b4ca9f48889 Mon Sep 17 00:00:00 2001 From: Rachel Lee Date: Wed, 12 Jan 2022 17:38:52 -0800 Subject: [PATCH 2/2] Update hwui with renamed AChoreographer method. Test: atest hwui_unit_tests Bug: 214303753 Change-Id: I8f0634306f483d21b85aa74f4c008c88badd5f8f --- 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 6755b7c081f44..d86237789b111 100644 --- a/libs/hwui/renderthread/RenderThread.cpp +++ b/libs/hwui/renderthread/RenderThread.cpp @@ -119,7 +119,7 @@ void RenderThread::extendedFrameCallback(const AChoreographerFrameCallbackData* AChoreographerFrameCallbackData_getPreferredFrameTimelineIndex(cbData); int64_t vsyncId = AChoreographerFrameCallbackData_getFrameTimelineVsyncId( cbData, preferredFrameTimelineIndex); - int64_t frameDeadline = AChoreographerFrameCallbackData_getFrameTimelineDeadline( + int64_t frameDeadline = AChoreographerFrameCallbackData_getFrameTimelineDeadlineNanos( cbData, preferredFrameTimelineIndex); int64_t frameTimeNanos = AChoreographerFrameCallbackData_getFrameTimeNanos(cbData); // TODO(b/193273294): Remove when shared memory in use w/ expected present time always current.