From: joonbum.ko Date: Thu, 22 Jun 2017 08:00:16 +0000 (+0900) Subject: wayland_egl: Added an API to set window_transform. X-Git-Tag: accepted/tizen/unified/20170711.180707~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7af8455c9d33d54ad0e97c5b35735164554f9715;p=platform%2Fcore%2Fuifw%2Flibtpl-egl.git wayland_egl: Added an API to set window_transform. - 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 --- diff --git a/packaging/libtpl-egl.spec b/packaging/libtpl-egl.spec index dbf739c..c251d96 100644 --- a/packaging/libtpl-egl.spec +++ b/packaging/libtpl-egl.spec @@ -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" diff --git a/src/wayland-egl/wayland-egl-priv.h b/src/wayland-egl/wayland-egl-priv.h index f2b2d05..87ff314 100644 --- a/src/wayland-egl/wayland-egl-priv.h +++ b/src/wayland-egl/wayland-egl-priv.h @@ -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 *); diff --git a/src/wayland-egl/wayland-egl.c b/src/wayland-egl/wayland-egl.c index 37e81d5..cabefc4 100644 --- a/src/wayland-egl/wayland-egl.c +++ b/src/wayland-egl/wayland-egl.c @@ -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; +}