From 06f4c3945dfcdb108e480961d9d76cdb75c9912c Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 27 Apr 2020 12:45:21 +0200 Subject: render/texture: add width and height fields Instead of requiring compositors to call wlr_texture_get_size each time they want to access the texture's size, expose this information as wlr_texture fields. --- include/wlr/render/wlr_texture.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/wlr/render/wlr_texture.h') diff --git a/include/wlr/render/wlr_texture.h b/include/wlr/render/wlr_texture.h index f2e6a37d..71ce5e7c 100644 --- a/include/wlr/render/wlr_texture.h +++ b/include/wlr/render/wlr_texture.h @@ -18,6 +18,7 @@ struct wlr_texture_impl; struct wlr_texture { const struct wlr_texture_impl *impl; + uint32_t width, height; }; /** @@ -43,6 +44,9 @@ struct wlr_texture *wlr_texture_from_dmabuf(struct wlr_renderer *renderer, /** * Get the texture width and height. + * + * This function is deprecated. Access wlr_texture's width and height fields + * directly instead. */ void wlr_texture_get_size(struct wlr_texture *texture, int *width, int *height); -- cgit v1.2.3