types/wlr_buffer: remove wlr_renderer argument from wlr_buffer_from_resource

This commit is contained in:
Simon Zeni 2021-07-12 11:39:26 -04:00 committed by Simon Ser
parent 2fa47c1837
commit f09c88c1b7
3 changed files with 3 additions and 6 deletions

View file

@ -118,8 +118,7 @@ bool wlr_buffer_get_shm(struct wlr_buffer *buffer,
* *
* The provided wl_resource must be a wl_buffer. * The provided wl_resource must be a wl_buffer.
*/ */
struct wlr_buffer *wlr_buffer_from_resource(struct wlr_renderer *renderer, struct wlr_buffer *wlr_buffer_from_resource(struct wl_resource *resource);
struct wl_resource *resource);
/** /**
* A client buffer. * A client buffer.

View file

@ -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( static struct wlr_shm_client_buffer *shm_client_buffer_from_buffer(
struct wlr_buffer *buffer); struct wlr_buffer *buffer);
struct wlr_buffer *wlr_buffer_from_resource(struct wlr_renderer *renderer, struct wlr_buffer *wlr_buffer_from_resource(struct wl_resource *resource) {
struct wl_resource *resource) {
assert(resource && wlr_resource_is_buffer(resource)); assert(resource && wlr_resource_is_buffer(resource));
struct wlr_buffer *buffer; struct wlr_buffer *buffer;

View file

@ -172,8 +172,7 @@ static void surface_state_finalize(struct wlr_surface *surface,
if ((state->committed & WLR_SURFACE_STATE_BUFFER)) { if ((state->committed & WLR_SURFACE_STATE_BUFFER)) {
if (state->buffer_resource) { if (state->buffer_resource) {
wlr_buffer_unlock(state->buffer); wlr_buffer_unlock(state->buffer);
state->buffer = wlr_buffer_from_resource(surface->renderer, state->buffer = wlr_buffer_from_resource(state->buffer_resource);
state->buffer_resource);
if (!state->buffer) { if (!state->buffer) {
wl_resource_post_error(state->buffer_resource, 0, wl_resource_post_error(state->buffer_resource, 0,
"unknown buffer type"); "unknown buffer type");