liupeng
7dcb3fcd4b
render: use the first free swapchain slot
...
Signed-off-by: liupeng <liupeng01@kylinos.cn>
2025-10-09 17:22:55 +08:00
Simon Ser
8fb4e4dabb
swapchain: assert that size is not empty at creation time
...
Failing later (at buffer allocation time) makes it more difficult
to track down where the issue comes from.
2025-06-16 07:54:00 +00:00
Simon Ser
4ec1defb3e
all: use public <wlr/render/allocator.h>
...
We don't need to use the private header in these files.
2024-11-07 18:48:20 +01:00
Alexander Orzechowski
bfcaa4bc44
swapchain, damage_ring: Drop buffer age
2024-08-21 09:45:54 -04:00
Alexander Orzechowski
6e03d3015e
swapchain: Add wlr_swapchain_has_buffer
2023-12-03 05:29:05 +00:00
Simon Ser
7a9f8d8d6b
Use struct initializers instead of memset()
...
This is a bit more type-safe.
2023-07-07 17:31:11 +02:00
Alexander Orzechowski
340700cb70
wlr_drm_format: Change wlr_drm_format_dup to copy
2023-05-11 18:24:43 +02:00
Alexander Orzechowski
b45396c790
wlr_drm_format: Introduce drm_format_finish
2023-05-11 03:51:01 -04:00
Simon Ser
8619ffab21
swapchain: remove allocator listener on destroy
...
Past that point the wlr_allocator is gone and the listeners are
invalidated.
2023-02-24 00:07:41 +01:00
Simon Ser
b33ab26fe7
render/swapchain: make public
...
We've had this struct for a while. It'd be useful for compositors
if they want to manage the swap chains themselves instead of being
forced to use wlr_output's. Some compositors might also want to use
a swapchain without an output.
2023-02-21 17:14:31 +01:00
Simon Ser
3ce2ea9e16
Move allocator stuff into new directory
...
Add render/allocator/ and include/render/allocator/ to hold
everything allocator-related.
2021-08-25 09:57:20 -04:00
Simon Ser
c11c6c4568
render/swapchain: add support for buffer age
2020-11-15 22:48:42 +01:00
Simon Ser
b0a663d39d
render: introduce wlr_swapchain
...
The swapchain maximum capacity is set to 4, so that we have enough room
for:
- A buffer currently displayed on screen
- A buffer queued for display (e.g. to KMS)
- A pending buffer that'll be queued next commit
- An additional pending buffer in case we want to invalidate the
currently pending one
2020-11-15 22:48:42 +01:00