From 2b0a1aeed5246fe41e6268c333f1e00b874fab02 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Fri, 4 Dec 2020 16:41:16 +0100 Subject: output: take a wlr_buffer in set_cursor Instead of passing a wlr_texture to the backend, directly pass a wlr_buffer. Use get_cursor_size and get_cursor_formats to create a wlr_buffer that can be used as a cursor. We don't want to pass a wlr_texture because we want to remove as many rendering bits from the backend as possible. --- include/wlr/interfaces/wlr_output.h | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'include/wlr/interfaces') diff --git a/include/wlr/interfaces/wlr_output.h b/include/wlr/interfaces/wlr_output.h index 7b07ea6e..aef41367 100644 --- a/include/wlr/interfaces/wlr_output.h +++ b/include/wlr/interfaces/wlr_output.h @@ -24,22 +24,15 @@ struct wlr_output_impl { /** * Set the output cursor plane image. * - * The parameters describe the image texture, its scale and its transform. - * If the scale and transform doesn't match the output's, the backend is - * responsible for scaling and transforming the texture appropriately. - * If texture is NULL, the cursor should be hidden. + * If buffer is NULL, the cursor should be hidden. * * The hotspot indicates the offset that needs to be applied to the * top-left corner of the image to match the cursor position. In other * words, the image should be displayed at (x - hotspot_x, y - hotspot_y). * The hotspot is given in the texture's coordinate space. - * - * If update_texture is true, all parameters need to be taken into account. - * If update_texture is false, only the hotspot is to be updated. */ - bool (*set_cursor)(struct wlr_output *output, struct wlr_texture *texture, - float scale, enum wl_output_transform transform, - int32_t hotspot_x, int32_t hotspot_y, bool update_texture); + bool (*set_cursor)(struct wlr_output *output, struct wlr_buffer *buffer, + int hotspot_x, int hotspot_y); /** * Set the output cursor plane position. * -- cgit v1.2.3