[Libva] [PATCH 12/16] va wayland update to use vaGetSurfaceBufferWl
Gwenole Beauchesne
gb.devel at gmail.com
Wed Jun 27 08:16:34 PDT 2012
Hi,
2012/6/5 Zhao Halley <halley.zhao at intel.com>:
> --- a/va/wayland/va_backend_wayland.h
> +++ b/va/wayland/va_backend_wayland.h
> @@ -30,30 +30,20 @@
> #include <va/va.h>
> #include <va/va_drmcommon.h>
> #include <wayland-client.h>
> +// #include <wayland-client-protocol.h>
> +// #include <wayland-drm-client-protocol.h>
Unrelated and un-necessary change.
> struct VADriverVTableWayland {
> - /* Create a surface used for rendering to Wayland */
> - VAStatus (*vaCreateSurfaceWL)(
> + struct wl_drm *wl_drm;
> + int name; // name of render_state->region->bo
No, definitely not.
> + /* Get wl_buffer from VASurface*/
> + VAStatus (*vaGetSurfaceBufferWl)(
> struct VADriverContext *ctx,
> - struct wl_surface *wl_surface,
> - struct va_wl_surface **out_va_wl_surface
> - );
> -
> - /* Destroy a VA/Waland surface */
> - VAStatus (*vaDestroySurfaceWL)(
> - struct VADriverContext *ctx,
> - struct va_wl_surface *va_wl_surface
> - );
> -
> - /* Attach a VA surface to a VA/WL surface */
> - VAStatus (*vaAttachSurfaceWL)(
> - struct VADriverContext *ctx,
> - struct va_wl_surface *va_wl_surface,
> VASurfaceID va_surface,
> - unsigned int flags
> + struct wl_buffer *out_buffer
> );
> };
Shouldn't this be struct wl_buffer **out_buffer?
> --- a/va/wayland/va_wayland.c
> +++ b/va/wayland/va_wayland.c
> @@ -27,11 +27,11 @@
> #include <stdio.h>
> #include <stdlib.h>
> #include <stdarg.h>
> -#include "va_wayland.h"
> -#include "va_wayland_drm.h"
> -#include "va_wayland_private.h"
> -#include "va_backend.h"
> -#include "va_backend_wayland.h"
> +#include "va/va_backend.h"
> +#include "va/wayland/va_wayland.h"
> +#include "va/wayland/va_wayland_drm.h"
> +#include "va/wayland/va_wayland_private.h"
> +#include "va/wayland/va_backend_wayland.h"
Un-necessary change.
> --- a/va/wayland/va_wayland.h
> +++ b/va/wayland/va_wayland.h
> @@ -48,16 +48,12 @@ extern "C" {
> *
> * Theory of operations:
> * - Create a VA display for an active Wayland display ;
> - * - Create a VA/Wayland surface wrapping a Wayland surface ;
> * - Perform normal VA-API operations, e.g. decode to a VA surface ;
> - * - Attach a VA surface to a VA/Wayland surface whenever necessary ;
> - * - Dispose the VA/Wayland surface before the child Wayland surface.
> + * - Get wl_buffer from a VA surface
> + * - Use wl_buffer to update wl_surface
> + * - Dispose the wl_buffer and vaSurface
> */
s/vaSurface/VA surface/
> -vaAttachSurfaceWL(
> +vaGetSurfaceBufferWl(
> VADisplay dpy,
> - VASurfaceWL va_wl_surface,
> VASurfaceID va_surface,
> - unsigned int flags
> + struct wl_buffer *out_buffer
> );
struct wl_buffer **out_buffer
More information about the Libva
mailing list