diff options
author | Ian Elliott | 2017-01-25 13:47:08 -0600 |
---|---|---|
committer | Ian Elliott | 2017-01-25 14:01:37 -0600 |
commit | 94ef994d0e1b2c633b5f9b0ee10c6d2bd12be928 (patch) | |
tree | 61538d93c265f97217cb9d0980d87b5b1bf55732 /include/system | |
parent | 9a617138cc3212e49a527ef3afc15ad221c325f3 (diff) | |
download | platform-system-core-94ef994d0e1b2c633b5f9b0ee10c6d2bd12be928.tar.gz platform-system-core-94ef994d0e1b2c633b5f9b0ee10c6d2bd12be928.tar.xz platform-system-core-94ef994d0e1b2c633b5f9b0ee10c6d2bd12be928.zip |
Vulkan: only report refresh duration (add new call for new way)
As part of discussions within Khronos, it was decided that
VK_GOOGLE_display_timing should only report one refresh duration for a display,
and assume that it's refresh rate is fixed (which is the case for our current
devices).
This commit adds the new macro/function that will be used long-term. A future
commit will remove the old macro/function, once it is no longer used (since the
plumbing crosses repository boundaires.
Test: Manually tested with a modified cube demo, that reports the refresh
duration returned from this extension.
Change-Id: Icff385db120f3e49fec0b2b8b0f35a06a9db6ca4
Diffstat (limited to 'include/system')
-rw-r--r-- | include/system/window.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/system/window.h b/include/system/window.h index 56c3da6f5..15a9a5511 100644 --- a/include/system/window.h +++ b/include/system/window.h | |||
@@ -355,7 +355,8 @@ enum { | |||
355 | NATIVE_WINDOW_SET_AUTO_REFRESH = 22, | 355 | NATIVE_WINDOW_SET_AUTO_REFRESH = 22, |
356 | NATIVE_WINDOW_ENABLE_FRAME_TIMESTAMPS = 23, | 356 | NATIVE_WINDOW_ENABLE_FRAME_TIMESTAMPS = 23, |
357 | NATIVE_WINDOW_GET_FRAME_TIMESTAMPS = 24, | 357 | NATIVE_WINDOW_GET_FRAME_TIMESTAMPS = 24, |
358 | NATIVE_WINDOW_GET_REFRESH_CYCLE_PERIOD = 25, | 358 | NATIVE_WINDOW_GET_REFRESH_CYCLE_DURATION= 25, |
359 | NATIVE_WINDOW_GET_REFRESH_CYCLE_PERIOD = 26, | ||
359 | }; | 360 | }; |
360 | 361 | ||
361 | /* parameter for NATIVE_WINDOW_[API_][DIS]CONNECT */ | 362 | /* parameter for NATIVE_WINDOW_[API_][DIS]CONNECT */ |
@@ -1040,6 +1041,14 @@ static inline int native_window_get_frame_timestamps( | |||
1040 | outDisplayRetireTime, outDequeueReadyTime, outReleaseTime); | 1041 | outDisplayRetireTime, outDequeueReadyTime, outReleaseTime); |
1041 | } | 1042 | } |
1042 | 1043 | ||
1044 | static inline int native_window_get_refresh_cycle_duration( | ||
1045 | struct ANativeWindow* window, | ||
1046 | int64_t* outRefreshDuration) | ||
1047 | { | ||
1048 | return window->perform(window, NATIVE_WINDOW_GET_REFRESH_CYCLE_DURATION, | ||
1049 | outRefreshDuration); | ||
1050 | } | ||
1051 | |||
1043 | static inline int native_window_get_refresh_cycle_period( | 1052 | static inline int native_window_get_refresh_cycle_period( |
1044 | struct ANativeWindow* window, | 1053 | struct ANativeWindow* window, |
1045 | int64_t* outMinRefreshDuration, int64_t* outMaxRefreshDuration) | 1054 | int64_t* outMinRefreshDuration, int64_t* outMaxRefreshDuration) |