From 77e1a042205eb05b339d6580eae3575135df1425 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Wed, 19 Jan 2022 02:38:16 +0000 Subject: [PATCH] gl-renderer: Remove extraneous parameters from attach The handlers can chase the details of the buffers themselves. Signed-off-by: Daniel Stone --- libweston/renderer-gl/gl-renderer.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libweston/renderer-gl/gl-renderer.c b/libweston/renderer-gl/gl-renderer.c index 6415a2da..dca0b9f2 100644 --- a/libweston/renderer-gl/gl-renderer.c +++ b/libweston/renderer-gl/gl-renderer.c @@ -1981,13 +1981,13 @@ ensure_textures(struct gl_surface_state *gs, GLenum target, int num_textures) } static bool -gl_renderer_attach_shm(struct weston_surface *es, struct weston_buffer *buffer, - struct wl_shm_buffer *shm_buffer) +gl_renderer_attach_shm(struct weston_surface *es, struct weston_buffer *buffer) { struct weston_compositor *ec = es->compositor; struct gl_renderer *gr = get_renderer(ec); struct gl_surface_state *gs = get_surface_state(es); struct gl_buffer_state *gb = &gs->buffer; + struct wl_shm_buffer *shm_buffer = buffer->shm_buffer; GLenum gl_format[3] = {0, 0, 0}; GLenum gl_pixel_type; int pitch; @@ -2895,12 +2895,12 @@ gl_renderer_import_dmabuf(struct weston_compositor *ec, static bool gl_renderer_attach_dmabuf(struct weston_surface *surface, - struct weston_buffer *buffer, - struct linux_dmabuf_buffer *dmabuf) + struct weston_buffer *buffer) { struct gl_renderer *gr = get_renderer(surface->compositor); struct gl_surface_state *gs = get_surface_state(surface); struct gl_buffer_state *gb = &gs->buffer; + struct linux_dmabuf_buffer *dmabuf = buffer->dmabuf; struct dmabuf_image *image; GLenum target; int i; @@ -3049,10 +3049,10 @@ gl_renderer_attach(struct weston_surface *es, struct weston_buffer *buffer) switch (buffer->type) { case WESTON_BUFFER_SHM: - ret = gl_renderer_attach_shm(es, buffer, buffer->shm_buffer); + ret = gl_renderer_attach_shm(es, buffer); break; case WESTON_BUFFER_DMABUF: - ret = gl_renderer_attach_dmabuf(es, buffer, buffer->dmabuf); + ret = gl_renderer_attach_dmabuf(es, buffer); break; case WESTON_BUFFER_RENDERER_OPAQUE: ret = gl_renderer_attach_egl(es, buffer);