aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Zeni <simon@bl4ckb0ne.ca>2021-07-12 11:39:26 -0400
committerSimon Ser <contact@emersion.fr>2021-07-22 22:28:24 +0200
commitf09c88c1b740146c72de45973c6fe8b5b514d711 (patch)
tree139f238d8f91159d8df306d32c86580035e1a819
parent2fa47c1837ef54642ce646bc14ef2b8ef1f37e8d (diff)
types/wlr_buffer: remove wlr_renderer argument from wlr_buffer_from_resource
-rw-r--r--include/wlr/types/wlr_buffer.h3
-rw-r--r--types/wlr_buffer.c3
-rw-r--r--types/wlr_surface.c3
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");