summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoonbum Ko <joonbum.ko@samsung.com>2019-07-18 13:59:32 +0900
committerJoonbum Ko <joonbum.ko@samsung.com>2019-07-18 14:11:41 +0900
commit0d0b3181ae4d3453139acf7c669cb944d53ee544 (patch)
treef65a812953a0c88f4333cdf6ff5b3a58a3a9c371
parent4bca5b15c21251adf9bdd51384296501b8460697 (diff)
downloadmesa-0d0b3181ae4d3453139acf7c669cb944d53ee544.tar.gz
mesa-0d0b3181ae4d3453139acf7c669cb944d53ee544.tar.bz2
mesa-0d0b3181ae4d3453139acf7c669cb944d53ee544.zip
This reverts commit e235e1fe2cc6046cac22135c9779b5630eeb8a3c. Change-Id: Ia8d67d3b392afdb10cf28168f3a456ee008728b8
-rw-r--r--src/egl/drivers/dri2/platform_wayland.c4
-rw-r--r--src/egl/wayland/wayland-egl/wayland-egl-priv.h26
-rw-r--r--src/egl/wayland/wayland-egl/wayland-egl.c30
3 files changed, 15 insertions, 45 deletions
diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index 40c6b38a339..c4a58a28d15 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -344,7 +344,7 @@ dri2_wl_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
dri2_surf->wl_queue);
dri2_surf->wl_win = window;
- dri2_surf->wl_win->private = dri2_surf;
+ dri2_surf->wl_win->driver_private = dri2_surf;
dri2_surf->wl_win->destroy_window_callback = destroy_window_callback;
if (dri2_dpy->flush)
dri2_surf->wl_win->resize_callback = resize_callback;
@@ -430,7 +430,7 @@ dri2_wl_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
wl_callback_destroy(dri2_surf->throttle_callback);
if (dri2_surf->wl_win) {
- dri2_surf->wl_win->private = NULL;
+ dri2_surf->wl_win->driver_private = NULL;
dri2_surf->wl_win->resize_callback = NULL;
dri2_surf->wl_win->destroy_window_callback = NULL;
}
diff --git a/src/egl/wayland/wayland-egl/wayland-egl-priv.h b/src/egl/wayland/wayland-egl/wayland-egl-priv.h
index 3a1beb420bd..63545fee221 100644
--- a/src/egl/wayland/wayland-egl/wayland-egl-priv.h
+++ b/src/egl/wayland/wayland-egl/wayland-egl-priv.h
@@ -3,17 +3,21 @@
#include <wayland-client.h>
-#include <wayland-egl.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-
+/*
+ * NOTE: This version must be kept in sync with the Version field in the
+ * wayland-egl-backend.pc.in file.
+ */
#define WL_EGL_WINDOW_VERSION 3
+struct wl_surface;
+
struct wl_egl_window {
const intptr_t version;
- struct wl_surface *surface;
int width;
int height;
@@ -23,19 +27,11 @@ struct wl_egl_window {
int attached_width;
int attached_height;
- wl_egl_window_rotation rotation;
- int frontbuffer_mode;
- int transform;
- int window_transform;
- unsigned int serial;
-
- void *private;
- void (*destroy_window_callback)(void *);
+ void *driver_private;
void (*resize_callback)(struct wl_egl_window *, void *);
- void (*rotate_callback)(struct wl_egl_window *, void *);
- int (*get_rotation_capability)(struct wl_egl_window *, void *);
- void (*set_frontbuffer_callback)(struct wl_egl_window *, void *, int);
- void (*set_window_serial_callback)(struct wl_egl_window *, void *, unsigned int);
+ void (*destroy_window_callback)(void *);
+
+ struct wl_surface *surface;
};
#ifdef __cplusplus
diff --git a/src/egl/wayland/wayland-egl/wayland-egl.c b/src/egl/wayland/wayland-egl/wayland-egl.c
index 46ac3f6cc18..0ef5fa70291 100644
--- a/src/egl/wayland/wayland-egl/wayland-egl.c
+++ b/src/egl/wayland/wayland-egl/wayland-egl.c
@@ -47,7 +47,7 @@ wl_egl_window_resize(struct wl_egl_window *egl_window,
egl_window->dy = dy;
if (egl_window->resize_callback)
- egl_window->resize_callback(egl_window, egl_window->private);
+ egl_window->resize_callback(egl_window, egl_window->driver_private);
}
WL_EGL_EXPORT struct wl_egl_window *
@@ -80,40 +80,14 @@ wl_egl_window_create(struct wl_surface *surface,
egl_window->width = width;
egl_window->height = height;
- egl_window->resize_callback = NULL;
- wl_egl_window_resize(egl_window, width, height, 0, 0);
-
- egl_window->attached_width = 0;
- egl_window->attached_height = 0;
-
- egl_window->rotation = ROTATION_0;
- egl_window->frontbuffer_mode = 0;
- egl_window->transform = 0;
- egl_window->window_transform = 0;
- egl_window->serial = 0;
-
- egl_window->private = NULL;
- egl_window->rotate_callback = NULL;
- egl_window->get_rotation_capability = NULL;
-
- egl_window->destroy_window_callback = NULL;
-
- WL_EGL_LOG(2, "surf:%10p WxH:%dx%d egl_win:%10p priv:%10p",
- surface, width, height, egl_window, egl_window->private);
-
return egl_window;
}
WL_EGL_EXPORT void
wl_egl_window_destroy(struct wl_egl_window *egl_window)
{
- if (egl_window == NULL) {
- WL_EGL_ERR("egl_window is NULL");
- return;
- }
-
if (egl_window->destroy_window_callback)
- egl_window->destroy_window_callback(egl_window->private);
+ egl_window->destroy_window_callback(egl_window->driver_private);
free(egl_window);
}