Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c0d38fcb authored by Rachel Lee's avatar Rachel Lee
Browse files

Attached Choreographer API from SurfaceControl.

The API to get a native attached choreographer from
ASurfaceControl.

Bug: 255838011
Test: atest GraphicsTest
Test: atest ChoreographerNativeTest (test no regression)
Change-Id: I5db99d8888fd2adbc4a8fc2ce9a7c07f4de146ee
parent 2248f52c
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -19,6 +19,8 @@


#include <stdint.h>
#include <stdint.h>


#include <android/choreographer.h>

__BEGIN_DECLS
__BEGIN_DECLS


struct ASurfaceControl;
struct ASurfaceControl;
@@ -55,6 +57,13 @@ void ASurfaceControl_registerSurfaceStatsListener(ASurfaceControl* control, int3
void ASurfaceControl_unregisterSurfaceStatsListener(void* context,
void ASurfaceControl_unregisterSurfaceStatsListener(void* context,
                                       ASurfaceControl_SurfaceStatsListener func);
                                       ASurfaceControl_SurfaceStatsListener func);


/**
 * Gets the attached AChoreographer instance from the given \c surfaceControl. If there is no
 * choreographer associated with the surface control, then a new instance of choreographer is
 * created. The new choreographer is associated with the current thread's Looper.
 */
AChoreographer* ASurfaceControl_getChoreographer(ASurfaceControl* surfaceControl);

/**
/**
 * Returns the timestamp of when the buffer was acquired for a specific frame with frame number
 * Returns the timestamp of when the buffer was acquired for a specific frame with frame number
 * obtained from ASurfaceControlStats_getFrameNumber.
 * obtained from ASurfaceControlStats_getFrameNumber.