mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
render/swapchain: add support for buffer age
This commit is contained in:
parent
ef846a8839
commit
c11c6c4568
2 changed files with 52 additions and 7 deletions
|
|
@ -10,6 +10,7 @@
|
|||
struct wlr_swapchain_slot {
|
||||
struct wlr_buffer *buffer;
|
||||
bool acquired; // waiting for release
|
||||
int age;
|
||||
|
||||
struct wl_listener release;
|
||||
};
|
||||
|
|
@ -35,7 +36,15 @@ void wlr_swapchain_destroy(struct wlr_swapchain *swapchain);
|
|||
* The returned buffer is locked. When the caller is done with it, they must
|
||||
* unlock it by calling wlr_buffer_unlock.
|
||||
*/
|
||||
struct wlr_buffer *wlr_swapchain_acquire(
|
||||
struct wlr_swapchain *swapchain);
|
||||
struct wlr_buffer *wlr_swapchain_acquire(struct wlr_swapchain *swapchain,
|
||||
int *age);
|
||||
/**
|
||||
* Mark the buffer as submitted for presentation. This needs to be called by
|
||||
* swap chain users on frame boundaries.
|
||||
*
|
||||
* If the buffer hasn't been created via the swap chain, the call is ignored.
|
||||
*/
|
||||
void wlr_swapchain_set_buffer_submitted(struct wlr_swapchain *swapchain,
|
||||
struct wlr_buffer *buffer);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue