From 42edd36785fac0a089d99f6b10d5ce5923c6b90f Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 5 Sep 2022 15:51:16 +0200 Subject: compositor: add wlr_surface_set_preferred_buffer_scale() References: https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/220 --- include/wlr/types/wlr_compositor.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/wlr') diff --git a/include/wlr/types/wlr_compositor.h b/include/wlr/types/wlr_compositor.h index 70b219d8..f65fbf84 100644 --- a/include/wlr/types/wlr_compositor.h +++ b/include/wlr/types/wlr_compositor.h @@ -163,6 +163,8 @@ struct wlr_surface { } previous; bool opaque; + + int32_t preferred_buffer_scale; }; struct wlr_renderer; @@ -319,6 +321,15 @@ uint32_t wlr_surface_lock_pending(struct wlr_surface *surface); */ void wlr_surface_unlock_cached(struct wlr_surface *surface, uint32_t seq); +/** + * Set the preferred buffer scale for the surface. + * + * This sends an event to the client indicating the preferred scale to use for + * buffers attached to this surface. + */ +void wlr_surface_set_preferred_buffer_scale(struct wlr_surface *surface, + int32_t scale); + /** * Create the wl_compositor global, which can be used by clients to create * surfaces and regions. -- cgit v1.2.3