[Mesa-dev] [PATCH] eglmesaext: add forward declaration for struct wl_buffers

Eric Engestrom eric.engestrom at imgtec.com
Thu Oct 12 12:51:48 UTC 2017


On Thursday, 2017-10-12 10:39:46 +0000, Emil Velikov wrote:
> From: Emil Velikov <emil.velikov at collabora.com>
> 
> The user does not need to know the specifics of the struct, as only a
> pointer to it is used.
> 
> Just forward declare the struct making the header self-contained and
> effectively removing the deprecation warning coming from the Wayland
> headers.
> 
> Cc: Greg V <greg at unrelenting.technology>
> Fixes: 5cddb1ce3c9 ("wayland: Add an extension to create wl_buffers from
> EGLImages")
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103225
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>

Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>

I think this should land regardless of whether Greg still sees a warning
on FreeBSD

> ---
> Greg please give this a try.
> Thanks
> ---
>  include/EGL/eglmesaext.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/EGL/eglmesaext.h b/include/EGL/eglmesaext.h
> index cff1bc6eee3..5bf6306a38e 100644
> --- a/include/EGL/eglmesaext.h
> +++ b/include/EGL/eglmesaext.h
> @@ -70,6 +70,7 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYWAYLANDBUFFERWL) (EGLDisplay dpy, st
>  #ifndef EGL_WL_create_wayland_buffer_from_image
>  #define EGL_WL_create_wayland_buffer_from_image 1
>  
> +struct wl_buffer;
>  #ifdef EGL_EGLEXT_PROTOTYPES
>  EGLAPI struct wl_buffer * EGLAPIENTRY eglCreateWaylandBufferFromImageWL(EGLDisplay dpy, EGLImageKHR image);
>  #endif

For reviewer help, the forward decl needs to be outside the #ifdef
because the next line is:

typedef struct wl_buffer * (EGLAPIENTRYP PFNEGLCREATEWAYLANDBUFFERFROMIMAGEWL) (EGLDisplay dpy, EGLImageKHR image);


> -- 
> 2.14.1
> 


More information about the mesa-dev mailing list