Sync wayland-egl code from wayland
authorXiaowei Guan <xiaowei.guan@samsung.com>
Mon, 13 May 2019 14:04:46 +0000 (22:04 +0800)
committerJoonbum Ko <joonbum.ko@samsung.com>
Mon, 3 Jun 2019 06:16:33 +0000 (15:16 +0900)
Because mesa need  use latest wayland-egl code, so sync latest
wayland-egl code from wayland.freedesktop.org.

Change-Id: I891d777e88540e64e509c8c991dc117750887bad

src/wayland-egl/wayland-egl-priv.h
src/wayland-egl/wayland-egl.c

index e729417..b37d9e2 100644 (file)
@@ -15,7 +15,10 @@ extern "C" {
 #include <wayland-client.h>
 #include <wayland-egl.h>
 
+#define WL_EGL_WINDOW_VERSION 3
+
 struct wl_egl_window {
+       const intptr_t version;
        struct wl_surface *surface;
 
        int width;
index cdb8b6a..05b726a 100644 (file)
@@ -90,11 +90,13 @@ wl_egl_window_create(struct wl_surface *surface,
                WL_EGL_ERR("failed to allocate memory for egl_window");
                return NULL;
        }
+       intptr_t *version = (intptr_t *)&egl_window->version;
+       *version = WL_EGL_WINDOW_VERSION;
 
        egl_window->surface = surface;
 
-       egl_window->width  = 0;
-       egl_window->height = 0;
+       egl_window->width  = width;
+       egl_window->height = height;
 
        egl_window->resize_callback = NULL;
        wl_egl_window_resize(egl_window, width, height, 0, 0);