[Cogl] [PATCH] wayland-server: Use wl_resource instead of wl_buffer
Robert Bragg
robert at sixbynine.org
Thu Oct 24 09:32:16 PDT 2013
This looks good to land to me:
Reviewed-by: Robert Bragg <robert at linux.intel.com>
thanks,
Robert
On Thu, Oct 24, 2013 at 3:58 PM, Neil Roberts <neil at linux.intel.com> wrote:
> wl_buffer has been deprecated in the server API and instead
> compositors should be directly passing the wl_resource pointer to
> eglQueryWaylandBuffer.
> ---
> cogl/cogl-texture-2d.c | 5 ++---
> cogl/winsys/cogl-winsys-egl-feature-functions.h | 2 +-
> cogl/winsys/cogl-winsys-egl-private.h | 2 +-
> cogl/winsys/cogl-winsys-egl.c | 2 +-
> 4 files changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/cogl/cogl-texture-2d.c b/cogl/cogl-texture-2d.c
> index fbf836e..07a9a3c 100644
> --- a/cogl/cogl-texture-2d.c
> +++ b/cogl/cogl-texture-2d.c
> @@ -294,12 +294,12 @@ _cogl_egl_texture_2d_new_from_image (CoglContext *ctx,
> #ifdef COGL_HAS_WAYLAND_EGL_SERVER_SUPPORT
> CoglTexture2D *
> cogl_wayland_texture_2d_new_from_buffer (CoglContext *ctx,
> - struct wl_resource *buffer_resource,
> + struct wl_resource *buffer,
> CoglError **error)
> {
> struct wl_shm_buffer *shm_buffer;
>
> - shm_buffer = wl_shm_buffer_get (buffer_resource);
> + shm_buffer = wl_shm_buffer_get (buffer);
>
> if (shm_buffer)
> {
> @@ -343,7 +343,6 @@ cogl_wayland_texture_2d_new_from_buffer (CoglContext *ctx,
> }
> else
> {
> - struct wl_buffer *buffer = (struct wl_buffer *) buffer_resource;
> int format, width, height;
>
> if (_cogl_egl_query_wayland_buffer (ctx,
> diff --git a/cogl/winsys/cogl-winsys-egl-feature-functions.h b/cogl/winsys/cogl-winsys-egl-feature-functions.h
> index 2758843..85c3079 100644
> --- a/cogl/winsys/cogl-winsys-egl-feature-functions.h
> +++ b/cogl/winsys/cogl-winsys-egl-feature-functions.h
> @@ -88,7 +88,7 @@ COGL_WINSYS_FEATURE_FUNCTION (EGLBoolean, eglUnbindWaylandDisplay,
> struct wl_display *wayland_display))
> COGL_WINSYS_FEATURE_FUNCTION (EGLBoolean, eglQueryWaylandBuffer,
> (EGLDisplay dpy,
> - struct wl_buffer *buffer,
> + struct wl_resource *buffer,
> EGLint attribute, EGLint *value))
> COGL_WINSYS_FEATURE_END ()
>
> diff --git a/cogl/winsys/cogl-winsys-egl-private.h b/cogl/winsys/cogl-winsys-egl-private.h
> index 9a3b4ad..8f33191 100644
> --- a/cogl/winsys/cogl-winsys-egl-private.h
> +++ b/cogl/winsys/cogl-winsys-egl-private.h
> @@ -162,7 +162,7 @@ _cogl_egl_destroy_image (CoglContext *ctx,
> #ifdef EGL_WL_bind_wayland_display
> CoglBool
> _cogl_egl_query_wayland_buffer (CoglContext *ctx,
> - struct wl_buffer *buffer,
> + struct wl_resource *buffer,
> int attribute,
> int *value);
> #endif
> diff --git a/cogl/winsys/cogl-winsys-egl.c b/cogl/winsys/cogl-winsys-egl.c
> index 18d2649..7df2245 100644
> --- a/cogl/winsys/cogl-winsys-egl.c
> +++ b/cogl/winsys/cogl-winsys-egl.c
> @@ -1045,7 +1045,7 @@ _cogl_egl_destroy_image (CoglContext *ctx,
> #ifdef EGL_WL_bind_wayland_display
> CoglBool
> _cogl_egl_query_wayland_buffer (CoglContext *ctx,
> - struct wl_buffer *buffer,
> + struct wl_resource *buffer,
> int attribute,
> int *value)
> {
> --
> 1.8.3.1
>
> _______________________________________________
> Cogl mailing list
> Cogl at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/cogl
More information about the Cogl
mailing list