wayland_egl: Added an API to set window_transform. 26/135726/1
authorjoonbum.ko <joonbum.ko@samsung.com>
Thu, 22 Jun 2017 08:00:16 +0000 (17:00 +0900)
committerjoonbum.ko <joonbum.ko@samsung.com>
Mon, 26 Jun 2017 06:47:26 +0000 (15:47 +0900)
 - New API :
   void wl_egl_set_window_transform(struct wl_egl_window *egl_window, int window_transform)

 - libwayland-egl package version up to 1.2.0

Change-Id: If1e225d5bdc043f9f1acc3da1c8894caeee12136
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
packaging/libtpl-egl.spec
src/wayland-egl/wayland-egl-priv.h
src/wayland-egl/wayland-egl.c

index dbf739c..c251d96 100644 (file)
@@ -21,7 +21,7 @@
 %define ENABLE_TPL_TEST        0
 
 #WAYLAND-EGL VERSION MACROS
-%define WL_EGL_VERSION 1.1.0
+%define WL_EGL_VERSION 1.2.0
 
 #TPL WINDOW SYSTEM CHECK
 %if "%{TPL_WINSYS}" != "DRI2" && "%{TPL_WINSYS}" != "DRI3" && "%{TPL_WINSYS}" != "WL"
index f2b2d05..87ff314 100644 (file)
@@ -29,6 +29,7 @@ struct wl_egl_window {
        wl_egl_window_rotation rotation;
        int frontbuffer_mode;
        int transform;
+       int window_transform;
 
        void *private;
        void (*resize_callback)(struct wl_egl_window *, void *);
index 37e81d5..cabefc4 100644 (file)
@@ -210,3 +210,22 @@ wl_egl_window_set_frontbuffer_mode(struct wl_egl_window *egl_window,
                egl_window->set_frontbuffer_callback(egl_window, egl_window->private,
                                                                                         set);
 }
+
+WL_EGL_EXPORT void
+wl_egl_window_set_window_transform(struct wl_egl_window *egl_window,
+                                                                  int window_transform)
+{
+       if (egl_window == NULL) {
+               WL_EGL_ERR("egl_window is NULL");
+               return;
+       }
+
+       if (egl_window->window_transform == window_transform) {
+               WL_EGL_LOG(2,
+                                  "window_transform(%d)  already rotated",
+                                  window_transform);
+               return;
+       }
+
+       egl_window->window_transform = window_transform;
+}