Add NATIVE_WINDOW_GET_COMPOSITOR_TIMING
Helps support eglGetCompositorTimingANDROID. Test: Manual testing with Chrome. Change-Id: I107cf14228dcde8da130bde6d477d0d0f1b38c5f
This commit is contained in:
parent
d1dbcd6f82
commit
ad79a39037
|
@ -353,10 +353,11 @@ enum {
|
|||
NATIVE_WINDOW_SET_SURFACE_DAMAGE = 20, /* private */
|
||||
NATIVE_WINDOW_SET_SHARED_BUFFER_MODE = 21,
|
||||
NATIVE_WINDOW_SET_AUTO_REFRESH = 22,
|
||||
NATIVE_WINDOW_GET_NEXT_FRAME_ID = 23,
|
||||
NATIVE_WINDOW_ENABLE_FRAME_TIMESTAMPS = 24,
|
||||
NATIVE_WINDOW_GET_FRAME_TIMESTAMPS = 25,
|
||||
NATIVE_WINDOW_GET_REFRESH_CYCLE_DURATION= 26,
|
||||
NATIVE_WINDOW_GET_REFRESH_CYCLE_DURATION= 23,
|
||||
NATIVE_WINDOW_GET_NEXT_FRAME_ID = 24,
|
||||
NATIVE_WINDOW_ENABLE_FRAME_TIMESTAMPS = 25,
|
||||
NATIVE_WINDOW_GET_COMPOSITOR_TIMING = 26,
|
||||
NATIVE_WINDOW_GET_FRAME_TIMESTAMPS = 27,
|
||||
};
|
||||
|
||||
/* parameter for NATIVE_WINDOW_[API_][DIS]CONNECT */
|
||||
|
@ -1019,6 +1020,14 @@ static inline int native_window_set_auto_refresh(
|
|||
return window->perform(window, NATIVE_WINDOW_SET_AUTO_REFRESH, autoRefresh);
|
||||
}
|
||||
|
||||
static inline int native_window_get_refresh_cycle_duration(
|
||||
struct ANativeWindow* window,
|
||||
int64_t* outRefreshDuration)
|
||||
{
|
||||
return window->perform(window, NATIVE_WINDOW_GET_REFRESH_CYCLE_DURATION,
|
||||
outRefreshDuration);
|
||||
}
|
||||
|
||||
static inline int native_window_get_next_frame_id(
|
||||
struct ANativeWindow* window, uint64_t* frameId)
|
||||
{
|
||||
|
@ -1032,6 +1041,15 @@ static inline int native_window_enable_frame_timestamps(
|
|||
enable);
|
||||
}
|
||||
|
||||
static inline int native_window_get_compositor_timing(
|
||||
struct ANativeWindow* window,
|
||||
int64_t* compositeDeadline, int64_t* compositeInterval,
|
||||
int64_t* compositeToPresentLatency)
|
||||
{
|
||||
return window->perform(window, NATIVE_WINDOW_GET_COMPOSITOR_TIMING,
|
||||
compositeDeadline, compositeInterval, compositeToPresentLatency);
|
||||
}
|
||||
|
||||
static inline int native_window_get_frame_timestamps(
|
||||
struct ANativeWindow* window, uint64_t frameId,
|
||||
int64_t* outRequestedPresentTime, int64_t* outAcquireTime,
|
||||
|
@ -1047,14 +1065,6 @@ static inline int native_window_get_frame_timestamps(
|
|||
outDisplayRetireTime, outDequeueReadyTime, outReleaseTime);
|
||||
}
|
||||
|
||||
static inline int native_window_get_refresh_cycle_duration(
|
||||
struct ANativeWindow* window,
|
||||
int64_t* outRefreshDuration)
|
||||
{
|
||||
return window->perform(window, NATIVE_WINDOW_GET_REFRESH_CYCLE_DURATION,
|
||||
outRefreshDuration);
|
||||
}
|
||||
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
|
Loading…
Reference in New Issue