[Mesa-dev] [PATCH] wayland-egl: forward declare wl_egl_window* functions
Gert Wollny
gw.fossdev at gmail.com
Thu Oct 26 07:47:36 UTC 2017
This patch fixes the build error that can currently (=16cfbef44cf0) be
seen with meson, so
Tested-by: Gert Wollny <gw.fossdev at gmail.com>
Am Dienstag, den 03.10.2017, 15:34 +0200 schrieb Tobias Klausmann:
> Starting with commit ab0589c6ed ("wayland-egl: remove no longer
> needed wayland-client dependency") the wayland-egl.h include was
> missing leading to a build failure:
>
> CC wayland-egl.lo
> wayland-egl.c:33:10: fatal error: wayland-egl.h: No such file or
> directory
> #include "wayland-egl.h"
> ^~~~~~~~~~~~~~~
>
> This commit forward declares the following 4 functions from wayland-
> egl-core.h,
> as suggested by Andres Gomez:
> * wl_egl_window_resize
> * wl_egl_window_create
> * wl_egl_window_destroy
> * wl_egl_window_get_attached_size
>
> With this we can drop the wayland-egl.h include!
>
> Fixes: ab0589c6ed ("wayland-egl: remove no longer needed wayland-
> client
> dependency")
> Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann at mni.thm.de
> >
> Reviewed-by: Emil Velikov <emil.velikov at collabora.com>
> ---
> src/egl/wayland/wayland-egl/wayland-egl-backend.h | 16
> ++++++++++++++++
> src/egl/wayland/wayland-egl/wayland-egl.c | 1 -
> 2 files changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/src/egl/wayland/wayland-egl/wayland-egl-backend.h
> b/src/egl/wayland/wayland-egl/wayland-egl-backend.h
> index 82f025cb5b..4887d34139 100644
> --- a/src/egl/wayland/wayland-egl/wayland-egl-backend.h
> +++ b/src/egl/wayland/wayland-egl/wayland-egl-backend.h
> @@ -56,6 +56,22 @@ struct wl_egl_window {
> struct wl_surface *surface;
> };
>
> +struct wl_egl_window *
> +wl_egl_window_create(struct wl_surface *surface,
> + int width, int height);
> +
> +void
> +wl_egl_window_destroy(struct wl_egl_window *egl_window);
> +
> +void
> +wl_egl_window_resize(struct wl_egl_window *egl_window,
> + int width, int height,
> + int dx, int dy);
> +
> +void
> +wl_egl_window_get_attached_size(struct wl_egl_window *egl_window,
> + int *width, int *height);
> +
> #ifdef __cplusplus
> }
> #endif
> diff --git a/src/egl/wayland/wayland-egl/wayland-egl.c
> b/src/egl/wayland/wayland-egl/wayland-egl.c
> index e7cea895ec..b70637cb07 100644
> --- a/src/egl/wayland/wayland-egl/wayland-egl.c
> +++ b/src/egl/wayland/wayland-egl/wayland-egl.c
> @@ -30,7 +30,6 @@
> #include <stdlib.h>
> #include <string.h>
>
> -#include "wayland-egl.h"
> #include "wayland-egl-backend.h"
>
> /* GCC visibility */
More information about the mesa-dev
mailing list