compositor: add wlr_surface_set_preferred_buffer_scale()

References: https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/220
This commit is contained in:
Simon Ser 2022-09-05 15:51:16 +02:00
parent 0bb574239d
commit 42edd36785
2 changed files with 29 additions and 1 deletions

View file

@ -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.