Plumb refresh cycle duration up to VK_GOOGLE_display_timing.
Test: Manually tested with a modified cube demo, that reports the refresh duration returned from this extension. Change-Id: Ida765850e185f5bdf6570796534be005791a64a8
This commit is contained in:
parent
0fd7d6f3c9
commit
b5663fc093
1 changed files with 9 additions and 0 deletions
|
@ -355,6 +355,7 @@ enum {
|
|||
NATIVE_WINDOW_SET_AUTO_REFRESH = 22,
|
||||
NATIVE_WINDOW_ENABLE_FRAME_TIMESTAMPS = 23,
|
||||
NATIVE_WINDOW_GET_FRAME_TIMESTAMPS = 24,
|
||||
NATIVE_WINDOW_GET_REFRESH_CYCLE_PERIOD = 25,
|
||||
};
|
||||
|
||||
/* parameter for NATIVE_WINDOW_[API_][DIS]CONNECT */
|
||||
|
@ -1039,6 +1040,14 @@ static inline int native_window_get_frame_timestamps(
|
|||
outDisplayRetireTime, outDequeueReadyTime, outReleaseTime);
|
||||
}
|
||||
|
||||
static inline int native_window_get_refresh_cycle_period(
|
||||
struct ANativeWindow* window,
|
||||
int64_t* outMinRefreshDuration, int64_t* outMaxRefreshDuration)
|
||||
{
|
||||
return window->perform(window, NATIVE_WINDOW_GET_REFRESH_CYCLE_PERIOD,
|
||||
outMinRefreshDuration, outMaxRefreshDuration);
|
||||
}
|
||||
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
|
Loading…
Reference in a new issue