On Thu, 15 Feb 2018 18:51:50 +0000 Emil Velikov <[email protected]> wrote:
> From: Emil Velikov <[email protected]> > > ... to get the user_data. Like everywhere else through weston. > > Signed-off-by: Emil Velikov <[email protected]> > --- > Some ancient patch, that I had locally. > Hi Emil, that's a good change, pushed: 8b964bca..2d8331c4 master -> master > It should be fine to land as-is, although it brings an interesting > question - should one keep struct linux_dmabuf_buffer private or not? > > - No - the get/set user data accessors seem (sort of) pointless > - Yes - one would need extra accessor for ::attributes, ...(?) I would agree on making struct linux_dmabuf_buffer private to linux-dmabuf.c, and letting struct dmabuf_attributes be "public" API, and add a getter for 'const struct dmabuf_attributes *'. From libweston point of view the whole linux-dmabuf.h is private API, because we don't support external-project renderers or backends for the time being. The header is also not installed. Unfortunately avoiding the WL_EXPORTs in linux-dmabuf.c is inconvenient, because we need the backend and renderer plugins to be able to access them. This "not actually libweston public ABI, but must still export for our own plugins" is a recurring issue throughout libweston. Thanks, pq > --- > libweston/gl-renderer.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c > index d091d165..d3ed4a10 100644 > --- a/libweston/gl-renderer.c > +++ b/libweston/gl-renderer.c > @@ -1748,7 +1748,7 @@ gl_renderer_attach_egl(struct weston_surface *es, > struct weston_buffer *buffer, > static void > gl_renderer_destroy_dmabuf(struct linux_dmabuf_buffer *dmabuf) > { > - struct dmabuf_image *image = dmabuf->user_data; > + struct dmabuf_image *image = linux_dmabuf_buffer_get_user_data(dmabuf); > > dmabuf_image_destroy(image); > }
pgpc2gl9mxpg_.pgp
Description: OpenPGP digital signature
_______________________________________________ wayland-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/wayland-devel
