wayland-egl: Make wl_egl_window a versioned struct
We need wl_egl_window to be a versioned struct in order to keep track of ABI changes. This change makes the first member of wl_egl_window the version number. An heuristic in the wayland driver is added so that we don't break backwards compatibility: - If the first field (version) is an actual pointer, it is an old implementation of wl_egl_window, and version points to the wl_surface proxy. - Else, the first field is the version number, and we have wl_egl_window::surface pointing to the wl_surface proxy. Signed-off-by:Miguel A. Vico <mvicomoya@nvidia.com> Reviewed-by:
James Jones <jajones@nvidia.com> Acked-by:
Daniel Stone <daniels@collabora.com> Reviewed-by:
Emil Velikov <emil.velikov@collabora.com>
- src/egl/drivers/dri2/platform_wayland.c 15 additions, 1 deletionsrc/egl/drivers/dri2/platform_wayland.c
- src/egl/wayland/wayland-egl/wayland-egl-priv.h 5 additions, 1 deletionsrc/egl/wayland/wayland-egl/wayland-egl-priv.h
- src/egl/wayland/wayland-egl/wayland-egl.c 4 additions, 0 deletionssrc/egl/wayland/wayland-egl/wayland-egl.c