mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 12:55:58 +01:00
types/wlr_buffer: remove wlr_renderer argument from wlr_buffer_from_resource
This commit is contained in:
parent
2fa47c1837
commit
f09c88c1b7
3 changed files with 3 additions and 6 deletions
|
@ -118,8 +118,7 @@ bool wlr_buffer_get_shm(struct wlr_buffer *buffer,
|
|||
*
|
||||
* The provided wl_resource must be a wl_buffer.
|
||||
*/
|
||||
struct wlr_buffer *wlr_buffer_from_resource(struct wlr_renderer *renderer,
|
||||
struct wl_resource *resource);
|
||||
struct wlr_buffer *wlr_buffer_from_resource(struct wl_resource *resource);
|
||||
|
||||
/**
|
||||
* A client buffer.
|
||||
|
|
|
@ -159,8 +159,7 @@ static bool buffer_is_shm_client_buffer(struct wlr_buffer *buffer);
|
|||
static struct wlr_shm_client_buffer *shm_client_buffer_from_buffer(
|
||||
struct wlr_buffer *buffer);
|
||||
|
||||
struct wlr_buffer *wlr_buffer_from_resource(struct wlr_renderer *renderer,
|
||||
struct wl_resource *resource) {
|
||||
struct wlr_buffer *wlr_buffer_from_resource(struct wl_resource *resource) {
|
||||
assert(resource && wlr_resource_is_buffer(resource));
|
||||
|
||||
struct wlr_buffer *buffer;
|
||||
|
|
|
@ -172,8 +172,7 @@ static void surface_state_finalize(struct wlr_surface *surface,
|
|||
if ((state->committed & WLR_SURFACE_STATE_BUFFER)) {
|
||||
if (state->buffer_resource) {
|
||||
wlr_buffer_unlock(state->buffer);
|
||||
state->buffer = wlr_buffer_from_resource(surface->renderer,
|
||||
state->buffer_resource);
|
||||
state->buffer = wlr_buffer_from_resource(state->buffer_resource);
|
||||
if (!state->buffer) {
|
||||
wl_resource_post_error(state->buffer_resource, 0,
|
||||
"unknown buffer type");
|
||||
|
|
Loading…
Reference in a new issue