diff options
| author | Alexander Orzechowski <alex@ozal.ski> | 2023-12-10 16:31:23 -0500 | 
|---|---|---|
| committer | Kirill Primak <vyivel@eclair.cafe> | 2024-01-29 19:17:39 +0000 | 
| commit | 8dff1bb9bdbb2d785ddb5d330934166d359b3d78 (patch) | |
| tree | 551b7773420481ad4a8601a1ba5c0b1202966fc0 /include/wlr | |
| parent | 4688a371e04787f5bb059e80b5de506f0a8f00ff (diff) | |
| download | wlroots-8dff1bb9bdbb2d785ddb5d330934166d359b3d78.tar.xz | |
wlr_damage_ring: Replace wlr_damage_ring_rotate_buffer with original list impl
The seq based implementation is complex to reason about and doesn't even
work.
Diffstat (limited to 'include/wlr')
| -rw-r--r-- | include/wlr/types/wlr_damage_ring.h | 9 | 
1 files changed, 4 insertions, 5 deletions
diff --git a/include/wlr/types/wlr_damage_ring.h b/include/wlr/types/wlr_damage_ring.h index 309d7ace..203d919f 100644 --- a/include/wlr/types/wlr_damage_ring.h +++ b/include/wlr/types/wlr_damage_ring.h @@ -17,8 +17,6 @@  /* For triple buffering, a history of two frames is required. */  #define WLR_DAMAGE_RING_PREVIOUS_LEN 2 -/* Keep track of as many buffers as a swapchain can hold */ -#define WLR_DAMAGE_RING_BUFFERS_LEN 4  struct wlr_box; @@ -26,7 +24,9 @@ struct wlr_damage_ring_buffer {  	struct wlr_buffer *buffer;  	struct wl_listener destroy;  	pixman_region32_t damage; -	uint64_t seq; + +	struct wlr_damage_ring *ring; +	struct wl_list link; // wlr_damage_ring.buffers  };  struct wlr_damage_ring { @@ -40,8 +40,7 @@ struct wlr_damage_ring {  	pixman_region32_t previous[WLR_DAMAGE_RING_PREVIOUS_LEN];  	size_t previous_idx; -	uint64_t last_buffer_seq; -	struct wlr_damage_ring_buffer buffers[WLR_DAMAGE_RING_BUFFERS_LEN]; +	struct wl_list buffers; // wlr_damage_ring_buffer.link  };  void wlr_damage_ring_init(struct wlr_damage_ring *ring);  | 
