summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Rachel Lee <rnlee@google.com> 2023-01-06 14:46:10 -0800
committer Rachel Lee <rnlee@google.com> 2023-02-01 15:12:47 -0800
commitc0d38fcbffee52ea08bc5e6c38e1fb1d5bbaee2c (patch)
tree40866ce1f4b27efe29bd3545ff2081a389fe6017
parent2248f52cd8102e5bc71c5c1dca7a85e90fea1276 (diff)
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
-rw-r--r--include/private/surface_control_private.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/private/surface_control_private.h b/include/private/surface_control_private.h
index 7e6c51587d..138926e55b 100644
--- a/include/private/surface_control_private.h
+++ b/include/private/surface_control_private.h
@@ -19,6 +19,8 @@
#include <stdint.h>
+#include <android/choreographer.h>
+
__BEGIN_DECLS
struct ASurfaceControl;
@@ -56,6 +58,13 @@ void ASurfaceControl_unregisterSurfaceStatsListener(void* context,
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
* obtained from ASurfaceControlStats_getFrameNumber.
*/