diff options
author | Miguel A. Vico <[email protected]> | 2017-07-19 17:27:12 -0700 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-07-24 10:27:52 +0100 |
commit | 2d5d61bc491b6cef08ced8f1ad57b154d4fa5f66 (patch) | |
tree | e03926206e5097cbda26e5d7007004ff47fa0eca /src/egl/wayland/wayland-egl/wayland-egl-priv.h | |
parent | 63c251e38f9b4ac3606094a72c8c5b658402f3d0 (diff) |
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 <[email protected]>
Reviewed-by: James Jones <[email protected]>
Acked-by: Daniel Stone <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/egl/wayland/wayland-egl/wayland-egl-priv.h')
-rw-r--r-- | src/egl/wayland/wayland-egl/wayland-egl-priv.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/egl/wayland/wayland-egl/wayland-egl-priv.h b/src/egl/wayland/wayland-egl/wayland-egl-priv.h index 92c31d94543..3b59908cc16 100644 --- a/src/egl/wayland/wayland-egl/wayland-egl-priv.h +++ b/src/egl/wayland/wayland-egl/wayland-egl-priv.h @@ -41,8 +41,10 @@ extern "C" { #endif +#define WL_EGL_WINDOW_VERSION 3 + struct wl_egl_window { - struct wl_surface *surface; + const intptr_t version; int width; int height; @@ -55,6 +57,8 @@ struct wl_egl_window { void *private; void (*resize_callback)(struct wl_egl_window *, void *); void (*destroy_window_callback)(void *); + + struct wl_surface *surface; }; #ifdef __cplusplus |