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

@ -278,6 +278,8 @@ struct wlr_output {
struct wlr_output_image_description image_description_value;
struct wlr_color_transform *color_transform;
struct wlr_color_primaries default_primaries_value;
int cursor_uploaded_this_frame;
struct wlr_output_cursor *cursor_pending_upload;
} WLR_PRIVATE;
};