[Mesa-dev] [PATCH 3/3] wayland: Add prime fd passing as a buffer sharing mechanism

Kristian Høgsberg hoegsberg at gmail.com
Mon Mar 18 18:02:17 PDT 2013


On Fri, Mar 01, 2013 at 02:06:03PM +0200, Ander Conselvan de Oliveira wrote:
> On 02/28/2013 03:52 AM, Kristian Høgsberg wrote:
> >diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
> >index b5cd04a..1b42a98 100644
> >--- a/src/egl/drivers/dri2/platform_wayland.c
> >+++ b/src/egl/drivers/dri2/platform_wayland.c
> >@@ -451,6 +451,46 @@ static const struct wl_callback_listener frame_listener = {
> >  	wayland_frame_callback
> >  };
> >
> >+static void
> >+create_wl_buffer(struct dri2_egl_surface *dri2_surf)
> >+{
> >+   struct dri2_egl_display *dri2_dpy =
> >+      dri2_egl_display(dri2_surf->base.Resource.Display);
> >+   int fd;
> >+
> >+   if (dri2_surf->current->wl_buffer != NULL)
> >+      return;
> >+
> >+   if (dri2_dpy->capabilities & WL_DRM_CAPABILITY_PRIME) {
> [...]
> >+      } else {
> 
> There's an indentation error here.
> 
> There's also lines replacing tabs with spaces, but I don't know what
> is supposed to be the coding style of those files. Indent is done
> both ways in them.

Uhm, yeah... fixed.  The mesa policy is to use spaces, but it's not
strictly enforced, but moving towards spaces can't be bad.  It comes from
the .dir-locals.el in the mesa top-level directory which makes my emacs
do it.

> Anyway, the series looks good to me, feel free to add my R-b,
> although you might want someone else to review the intel_screen.c
> changes too. I'm not that familiar with that code.

Thanks,
Kristian


More information about the wayland-devel mailing list