From 225d182765eb69aa7a7647c809c37903ec08519c Mon Sep 17 00:00:00 2001 From: emersion Date: Tue, 1 May 2018 21:38:04 +0100 Subject: output: always use hardware cursors if available This changes the `wlr_output_impl.set_cursor` function to take a `wlr_texture` instead of a byte buffer. This simplifies the DRM and Wayland backends since they were creating textures from the byte buffer anyway. With this commit, performance should be improved when moving the cursor since outputs don't need to be re-rendered anymore. --- include/wlr/interfaces/wlr_output.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'include/wlr/interfaces') diff --git a/include/wlr/interfaces/wlr_output.h b/include/wlr/interfaces/wlr_output.h index c9ddf615..d8c54067 100644 --- a/include/wlr/interfaces/wlr_output.h +++ b/include/wlr/interfaces/wlr_output.h @@ -13,9 +13,8 @@ struct wlr_output_impl { int32_t height, int32_t refresh); void (*transform)(struct wlr_output *output, enum wl_output_transform transform); - bool (*set_cursor)(struct wlr_output *output, const uint8_t *buf, - int32_t stride, uint32_t width, uint32_t height, - int32_t hotspot_x, int32_t hotspot_y, bool update_pixels); + bool (*set_cursor)(struct wlr_output *output, struct wlr_texture *texture, + int32_t hotspot_x, int32_t hotspot_y, bool update_texture); bool (*move_cursor)(struct wlr_output *output, int x, int y); void (*destroy)(struct wlr_output *output); bool (*make_current)(struct wlr_output *output, int *buffer_age); -- cgit v1.2.3