output: limit rate of hardware cursor texture change

A client that generates lots of cursor image changes could cause a
high render load, or deplete the output's cursor swapchain on some
backends.

Limit to two renders per frame, and catch up after output commit if
necessary.
This commit is contained in:
Félix Poisot 2026-03-21 08:45:48 +00:00
parent fd870f6d27
commit c5641f6de5
4 changed files with 22 additions and 1 deletions

View file

@ -17,6 +17,7 @@ bool output_pick_format(struct wlr_output *output,
bool output_ensure_buffer(struct wlr_output *output,
struct wlr_output_state *state, bool *new_back_buffer);
bool output_cursor_attempt_hardware(struct wlr_output_cursor *cursor);
bool output_cursor_set_texture(struct wlr_output_cursor *cursor,
struct wlr_texture *texture, bool own_texture, const struct wlr_fbox *src_box,
int dst_width, int dst_height, enum wl_output_transform transform,