From f09c88c1b740146c72de45973c6fe8b5b514d711 Mon Sep 17 00:00:00 2001 From: Simon Zeni Date: Mon, 12 Jul 2021 11:39:26 -0400 Subject: types/wlr_buffer: remove wlr_renderer argument from wlr_buffer_from_resource --- include/wlr/types/wlr_buffer.h | 3 +-- types/wlr_buffer.c | 3 +-- types/wlr_surface.c | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/include/wlr/types/wlr_buffer.h b/include/wlr/types/wlr_buffer.h index 046cd392..edf53144 100644 --- a/include/wlr/types/wlr_buffer.h +++ b/include/wlr/types/wlr_buffer.h @@ -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. diff --git a/types/wlr_buffer.c b/types/wlr_buffer.c index d44c2b4e..c7f78fd7 100644 --- a/types/wlr_buffer.c +++ b/types/wlr_buffer.c @@ -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; diff --git a/types/wlr_surface.c b/types/wlr_surface.c index 43e26c13..5d44c001 100644 --- a/types/wlr_surface.c +++ b/types/wlr_surface.c @@ -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"); -- cgit v1.2.3