Loading include/android/choreographer.h +7 −1 Original line number Original line Diff line number Diff line Loading @@ -39,6 +39,12 @@ struct AChoreographer; */ */ typedef struct AChoreographer AChoreographer; typedef struct AChoreographer AChoreographer; /** * The identifier of a frame timeline. */ typedef int64_t AVsyncId; struct AChoreographerFrameCallbackData; struct AChoreographerFrameCallbackData; /** /** * Opaque type that provides access to an AChoreographerFrameCallbackData object. * Opaque type that provides access to an AChoreographerFrameCallbackData object. Loading Loading @@ -203,7 +209,7 @@ size_t AChoreographerFrameCallbackData_getPreferredFrameTimelineIndex( /** /** * The vsync ID token used to map Choreographer data. * The vsync ID token used to map Choreographer data. */ */ int64_t AChoreographerFrameCallbackData_getFrameTimelineVsyncId( AVsyncId AChoreographerFrameCallbackData_getFrameTimelineVsyncId( const AChoreographerFrameCallbackData* data, size_t index) __INTRODUCED_IN(33); const AChoreographerFrameCallbackData* data, size_t index) __INTRODUCED_IN(33); /** /** Loading include/android/surface_control.h +14 −3 Original line number Original line Diff line number Diff line Loading @@ -28,6 +28,7 @@ #include <sys/cdefs.h> #include <sys/cdefs.h> #include <android/choreographer.h> #include <android/data_space.h> #include <android/data_space.h> #include <android/hardware_buffer.h> #include <android/hardware_buffer.h> #include <android/hdr_metadata.h> #include <android/hdr_metadata.h> Loading Loading @@ -596,13 +597,23 @@ void ASurfaceTransaction_setEnableBackPressure(ASurfaceTransaction* transaction, __INTRODUCED_IN(31); __INTRODUCED_IN(31); /** /** * Sets the frame timeline to use. * Sets the frame timeline to use in Surface Flinger. * * A frame timeline should be chosen based on what frame deadline the application * can meet when rendering the frame and the application's desired present time. * By setting a frame timeline, Surface Flinger tries to present the frame at the corresponding * expected present time. * * To receive frame timelines, a callback must be posted to Choreographer using * AChoreographer_postExtendedFrameCallback(). The \a vsnycId can then be extracted from the * callback payload using AChoreographerFrameCallbackData_getFrameTimelineVsyncId(). * * * \param vsyncId The vsync ID received from AChoreographer, setting the frame's present target to * \param vsyncId The vsync ID received from AChoreographer, setting the frame's present target to * the corresponding expected present time and deadline from the frame to be rendered. * the corresponding expected present time and deadline from the frame to be rendered. A stale or * invalid value will be ignored. */ */ void ASurfaceTransaction_setFrameTimeline(ASurfaceTransaction* transaction, void ASurfaceTransaction_setFrameTimeline(ASurfaceTransaction* transaction, int64_t vsyncId) __INTRODUCED_IN(33); AVsyncId vsyncId) __INTRODUCED_IN(33); __END_DECLS __END_DECLS Loading libs/nativedisplay/AChoreographer.cpp +2 −2 Original line number Original line Diff line number Diff line Loading @@ -552,7 +552,7 @@ size_t AChoreographerFrameCallbackData_routeGetPreferredFrameTimelineIndex( const AChoreographerFrameCallbackData* data) { const AChoreographerFrameCallbackData* data) { return AChoreographerFrameCallbackData_getPreferredFrameTimelineIndex(data); return AChoreographerFrameCallbackData_getPreferredFrameTimelineIndex(data); } } int64_t AChoreographerFrameCallbackData_routeGetFrameTimelineVsyncId( AVsyncId AChoreographerFrameCallbackData_routeGetFrameTimelineVsyncId( const AChoreographerFrameCallbackData* data, size_t index) { const AChoreographerFrameCallbackData* data, size_t index) { return AChoreographerFrameCallbackData_getFrameTimelineVsyncId(data, index); return AChoreographerFrameCallbackData_getFrameTimelineVsyncId(data, index); } } Loading Loading @@ -644,7 +644,7 @@ size_t AChoreographerFrameCallbackData_getPreferredFrameTimelineIndex( "Data is only valid in callback"); "Data is only valid in callback"); return frameCallbackData->preferredFrameTimelineIndex; return frameCallbackData->preferredFrameTimelineIndex; } } int64_t AChoreographerFrameCallbackData_getFrameTimelineVsyncId( AVsyncId AChoreographerFrameCallbackData_getFrameTimelineVsyncId( const AChoreographerFrameCallbackData* data, size_t index) { const AChoreographerFrameCallbackData* data, size_t index) { const ChoreographerFrameCallbackDataImpl* frameCallbackData = const ChoreographerFrameCallbackDataImpl* frameCallbackData = AChoreographerFrameCallbackData_to_ChoreographerFrameCallbackDataImpl(data); AChoreographerFrameCallbackData_to_ChoreographerFrameCallbackDataImpl(data); Loading libs/nativedisplay/include-private/private/android/choreographer.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -65,7 +65,7 @@ size_t AChoreographerFrameCallbackData_routeGetFrameTimelinesLength( const AChoreographerFrameCallbackData* data); const AChoreographerFrameCallbackData* data); size_t AChoreographerFrameCallbackData_routeGetPreferredFrameTimelineIndex( size_t AChoreographerFrameCallbackData_routeGetPreferredFrameTimelineIndex( const AChoreographerFrameCallbackData* data); const AChoreographerFrameCallbackData* data); int64_t AChoreographerFrameCallbackData_routeGetFrameTimelineVsyncId( AVsyncId AChoreographerFrameCallbackData_routeGetFrameTimelineVsyncId( const AChoreographerFrameCallbackData* data, size_t index); const AChoreographerFrameCallbackData* data, size_t index); int64_t AChoreographerFrameCallbackData_routeGetFrameTimelineExpectedPresentTimeNanos( int64_t AChoreographerFrameCallbackData_routeGetFrameTimelineExpectedPresentTimeNanos( const AChoreographerFrameCallbackData* data, size_t index); const AChoreographerFrameCallbackData* data, size_t index); Loading Loading
include/android/choreographer.h +7 −1 Original line number Original line Diff line number Diff line Loading @@ -39,6 +39,12 @@ struct AChoreographer; */ */ typedef struct AChoreographer AChoreographer; typedef struct AChoreographer AChoreographer; /** * The identifier of a frame timeline. */ typedef int64_t AVsyncId; struct AChoreographerFrameCallbackData; struct AChoreographerFrameCallbackData; /** /** * Opaque type that provides access to an AChoreographerFrameCallbackData object. * Opaque type that provides access to an AChoreographerFrameCallbackData object. Loading Loading @@ -203,7 +209,7 @@ size_t AChoreographerFrameCallbackData_getPreferredFrameTimelineIndex( /** /** * The vsync ID token used to map Choreographer data. * The vsync ID token used to map Choreographer data. */ */ int64_t AChoreographerFrameCallbackData_getFrameTimelineVsyncId( AVsyncId AChoreographerFrameCallbackData_getFrameTimelineVsyncId( const AChoreographerFrameCallbackData* data, size_t index) __INTRODUCED_IN(33); const AChoreographerFrameCallbackData* data, size_t index) __INTRODUCED_IN(33); /** /** Loading
include/android/surface_control.h +14 −3 Original line number Original line Diff line number Diff line Loading @@ -28,6 +28,7 @@ #include <sys/cdefs.h> #include <sys/cdefs.h> #include <android/choreographer.h> #include <android/data_space.h> #include <android/data_space.h> #include <android/hardware_buffer.h> #include <android/hardware_buffer.h> #include <android/hdr_metadata.h> #include <android/hdr_metadata.h> Loading Loading @@ -596,13 +597,23 @@ void ASurfaceTransaction_setEnableBackPressure(ASurfaceTransaction* transaction, __INTRODUCED_IN(31); __INTRODUCED_IN(31); /** /** * Sets the frame timeline to use. * Sets the frame timeline to use in Surface Flinger. * * A frame timeline should be chosen based on what frame deadline the application * can meet when rendering the frame and the application's desired present time. * By setting a frame timeline, Surface Flinger tries to present the frame at the corresponding * expected present time. * * To receive frame timelines, a callback must be posted to Choreographer using * AChoreographer_postExtendedFrameCallback(). The \a vsnycId can then be extracted from the * callback payload using AChoreographerFrameCallbackData_getFrameTimelineVsyncId(). * * * \param vsyncId The vsync ID received from AChoreographer, setting the frame's present target to * \param vsyncId The vsync ID received from AChoreographer, setting the frame's present target to * the corresponding expected present time and deadline from the frame to be rendered. * the corresponding expected present time and deadline from the frame to be rendered. A stale or * invalid value will be ignored. */ */ void ASurfaceTransaction_setFrameTimeline(ASurfaceTransaction* transaction, void ASurfaceTransaction_setFrameTimeline(ASurfaceTransaction* transaction, int64_t vsyncId) __INTRODUCED_IN(33); AVsyncId vsyncId) __INTRODUCED_IN(33); __END_DECLS __END_DECLS Loading
libs/nativedisplay/AChoreographer.cpp +2 −2 Original line number Original line Diff line number Diff line Loading @@ -552,7 +552,7 @@ size_t AChoreographerFrameCallbackData_routeGetPreferredFrameTimelineIndex( const AChoreographerFrameCallbackData* data) { const AChoreographerFrameCallbackData* data) { return AChoreographerFrameCallbackData_getPreferredFrameTimelineIndex(data); return AChoreographerFrameCallbackData_getPreferredFrameTimelineIndex(data); } } int64_t AChoreographerFrameCallbackData_routeGetFrameTimelineVsyncId( AVsyncId AChoreographerFrameCallbackData_routeGetFrameTimelineVsyncId( const AChoreographerFrameCallbackData* data, size_t index) { const AChoreographerFrameCallbackData* data, size_t index) { return AChoreographerFrameCallbackData_getFrameTimelineVsyncId(data, index); return AChoreographerFrameCallbackData_getFrameTimelineVsyncId(data, index); } } Loading Loading @@ -644,7 +644,7 @@ size_t AChoreographerFrameCallbackData_getPreferredFrameTimelineIndex( "Data is only valid in callback"); "Data is only valid in callback"); return frameCallbackData->preferredFrameTimelineIndex; return frameCallbackData->preferredFrameTimelineIndex; } } int64_t AChoreographerFrameCallbackData_getFrameTimelineVsyncId( AVsyncId AChoreographerFrameCallbackData_getFrameTimelineVsyncId( const AChoreographerFrameCallbackData* data, size_t index) { const AChoreographerFrameCallbackData* data, size_t index) { const ChoreographerFrameCallbackDataImpl* frameCallbackData = const ChoreographerFrameCallbackDataImpl* frameCallbackData = AChoreographerFrameCallbackData_to_ChoreographerFrameCallbackDataImpl(data); AChoreographerFrameCallbackData_to_ChoreographerFrameCallbackDataImpl(data); Loading
libs/nativedisplay/include-private/private/android/choreographer.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -65,7 +65,7 @@ size_t AChoreographerFrameCallbackData_routeGetFrameTimelinesLength( const AChoreographerFrameCallbackData* data); const AChoreographerFrameCallbackData* data); size_t AChoreographerFrameCallbackData_routeGetPreferredFrameTimelineIndex( size_t AChoreographerFrameCallbackData_routeGetPreferredFrameTimelineIndex( const AChoreographerFrameCallbackData* data); const AChoreographerFrameCallbackData* data); int64_t AChoreographerFrameCallbackData_routeGetFrameTimelineVsyncId( AVsyncId AChoreographerFrameCallbackData_routeGetFrameTimelineVsyncId( const AChoreographerFrameCallbackData* data, size_t index); const AChoreographerFrameCallbackData* data, size_t index); int64_t AChoreographerFrameCallbackData_routeGetFrameTimelineExpectedPresentTimeNanos( int64_t AChoreographerFrameCallbackData_routeGetFrameTimelineExpectedPresentTimeNanos( const AChoreographerFrameCallbackData* data, size_t index); const AChoreographerFrameCallbackData* data, size_t index); Loading