Rename the directory of wayland-egl to wayland-egl-tizen. 46/219546/1
authorJoonbum Ko <joonbum.ko@samsung.com>
Mon, 11 Nov 2019 02:38:59 +0000 (11:38 +0900)
committerJoonbum Ko <joonbum.ko@samsung.com>
Fri, 6 Dec 2019 01:55:18 +0000 (10:55 +0900)
Change-Id: I4e2c8f4764a26ace10c26e0b55db9e6118d38a41
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
14 files changed:
Makefile.am
configure.ac
src/tpl_wayland_egl.c
src/tpl_wayland_egl_thread.c
src/wayland-egl-tizen/Makefile.am [new file with mode: 0644]
src/wayland-egl-tizen/wayland-egl-tizen-priv.h [new file with mode: 0644]
src/wayland-egl-tizen/wayland-egl-tizen.c [new file with mode: 0644]
src/wayland-egl-tizen/wayland-egl-tizen.h [new file with mode: 0644]
src/wayland-egl/Makefile.am [deleted file]
src/wayland-egl/wayland-egl-tizen-priv.h [deleted file]
src/wayland-egl/wayland-egl-tizen.c [deleted file]
src/wayland-egl/wayland-egl-tizen.h [deleted file]
tc/Makefile.am
worker_test/Makefile

index 66af45b2ffd6ac4503e5426a91f046484e7ca97b..57ca9b8f7b31caae13a27128b7c2065ded736232 100644 (file)
@@ -1,10 +1,10 @@
 if WITH_UTEST
 SUBDIRS = src \
-          src/wayland-egl \
+          src/wayland-egl-tizen \
           tc \
           pkgconfig
 else
 SUBDIRS = src \
-          src/wayland-egl \
+          src/wayland-egl-tizen \
           pkgconfig
 endif
index 8a4f7060b2363f493affe901950f32927c87b6b5..077366e44e778dd4f95e40429032441f9f733c11 100644 (file)
@@ -212,7 +212,7 @@ AC_CHECK_FUNCS([clock_gettime memset])
 AC_CONFIG_FILES([
                                 Makefile
                                 src/Makefile
-                                src/wayland-egl/Makefile
+                                src/wayland-egl-tizen/Makefile
                                 pkgconfig/Makefile
                                 pkgconfig/tpl-egl.pc
                                 pkgconfig/wayland-egl-tizen.pc
index 69b34de10146bf1a3f8d489d1d1d0a71d8a78b50..d3d4d38c3a0611f05726e1eb9e9eaece73c44e09 100755 (executable)
@@ -2,8 +2,8 @@
 
 #include <wayland-client.h>
 #include <wayland-egl-backend.h>
-#include "wayland-egl/wayland-egl-tizen.h"
-#include "wayland-egl/wayland-egl-tizen-priv.h"
+#include "wayland-egl-tizen/wayland-egl-tizen.h"
+#include "wayland-egl-tizen/wayland-egl-tizen-priv.h"
 
 #undef inline
 
index 13a6a1499ccf0d2f805b0b5ecef09dc28c40261f..dca65976959f8585fb5724b331d83a77df41e3dd 100755 (executable)
@@ -13,8 +13,8 @@
 
 #include "tpl_utils.h"
 #include "tpl_internal.h"
-#include "wayland-egl/wayland-egl-tizen.h"
-#include "wayland-egl/wayland-egl-tizen-priv.h"
+#include "wayland-egl-tizen/wayland-egl-tizen.h"
+#include "wayland-egl-tizen/wayland-egl-tizen-priv.h"
 #include "tpl_wayland_egl_thread.h"
 #include "wayland-vulkan/wayland-vulkan-client-protocol.h"
 #include "tpl_utils.h"
diff --git a/src/wayland-egl-tizen/Makefile.am b/src/wayland-egl-tizen/Makefile.am
new file mode 100644 (file)
index 0000000..f08f23d
--- /dev/null
@@ -0,0 +1,12 @@
+libwayland_egl_tizen_la_LTLIBRARIES = libwayland-egl-tizen.la
+libwayland_egl_tizen_ladir = $(libdir)
+
+libwayland_egl_tizen_lainclude_HEADERS = wayland-egl-tizen.h
+libwayland_egl_tizen_laincludedir = $(includedir)
+
+libwayland_egl_tizen_la_CFLAGS = -I$(srcdir)   \
+                                                                @WL_EGL_TIZEN_CFLAGS@
+
+libwayland_egl_tizen_la_LIBADD = @WL_EGL_TIZEN_LIBS@
+libwayland_egl_tizen_la_LDFLAGS = -version-number @WL_EGL_TIZEN_VERSION_MAJOR@:@WL_EGL_TIZEN_VERSION_MINOR@:@WL_EGL_TIZEN_VERSION_PATCH@
+libwayland_egl_tizen_la_SOURCES = wayland-egl-tizen.c
diff --git a/src/wayland-egl-tizen/wayland-egl-tizen-priv.h b/src/wayland-egl-tizen/wayland-egl-tizen-priv.h
new file mode 100644 (file)
index 0000000..5b65a70
--- /dev/null
@@ -0,0 +1,52 @@
+#ifndef _WAYLAND_EGL_TIZEN_PRIV_H
+#define _WAYLAND_EGL_TIZEN_PRIV_H
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
+#include <stdlib.h>
+#include <wayland-client.h>
+#include <wayland-egl.h>
+
+struct tizen_private {
+       int rotation;
+       int frontbuffer_mode;
+       int transform;
+       int window_transform;
+       unsigned int serial;
+
+       void *data;
+
+    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);
+};
+
+static struct tizen_private* tizen_private_create()
+{
+       struct tizen_private *private = NULL;
+       private = (struct tizen_private *)calloc(1, sizeof(struct tizen_private));
+       if (private) {
+               private->rotation = 0;
+               private->frontbuffer_mode = 0;
+               private->transform = 0;
+               private->window_transform = 0;
+               private->serial = 0;
+
+               private->data = NULL;
+               private->rotate_callback = NULL;
+               private->get_rotation_capability = NULL;
+               private->set_window_serial_callback = NULL;
+               private->set_frontbuffer_callback = NULL;
+       }
+
+       return private;
+}
+
+#ifdef  __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/wayland-egl-tizen/wayland-egl-tizen.c b/src/wayland-egl-tizen/wayland-egl-tizen.c
new file mode 100644 (file)
index 0000000..4c127bc
--- /dev/null
@@ -0,0 +1,253 @@
+#include <wayland-egl.h>
+#include <wayland-egl-backend.h>
+#include "wayland-egl-tizen.h"
+#include "wayland-egl-tizen-priv.h"
+
+#define WL_EGL_DEBUG 1
+#if WL_EGL_DEBUG
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/syscall.h>
+#include <sys/types.h>
+#include <signal.h>
+
+unsigned int wl_egl_log_level;
+
+/* WL-EGL Log Level - 0:unintialized, 1:initialized(no logging), 2:min log, 3:more log */
+#define WL_EGL_LOG(lvl, f, x...) {                                                             \
+               if (wl_egl_log_level == 1) {                                                    \
+               }                                                                                                               \
+               else if (wl_egl_log_level > 1) {                                                \
+                       if (wl_egl_log_level <= lvl)                                            \
+                               WL_EGL_LOG_PRINT(f, ##x)                                                \
+               }                                                                                                               \
+               else {                                                                                                  \
+                       char *env = getenv("WL_EGL_LOG_LEVEL");                         \
+                       if (env == NULL)                                                                        \
+                               wl_egl_log_level = 1;                                                   \
+                       else                                                                                            \
+                               wl_egl_log_level = atoi(env);                                   \
+                                                                                                                               \
+                       if (wl_egl_log_level > 1 && wl_egl_log_level <= lvl)\
+                               WL_EGL_LOG_PRINT(f, ##x)                                                \
+               }                                                                                                               \
+       }
+
+#define WL_EGL_LOG_PRINT(fmt, args...) {                                                                               \
+               printf("[\x1b[32mWL-EGL\x1b[0m %d:%d|\x1b[32m%s\x1b[0m|%d] " fmt "\n",  \
+                       getpid(), (int)syscall(SYS_gettid), __func__, __LINE__, ##args);        \
+       }
+
+#define WL_EGL_ERR(f, x...)    {                                                                                                       \
+               printf("[\x1b[31mWL-EGL_ERR\x1b[0m %d:%d|\x1b[31m%s\x1b[0m|%d] " f "\n",\
+                       getpid(), (int)syscall(SYS_gettid), __func__, __LINE__, ##x);           \
+       }
+
+#else
+#define WL_EGL_LOG(lvl, f, x...)
+#endif
+
+void
+wl_egl_window_tizen_set_rotation(struct wl_egl_window *egl_window,
+                                                                int rotation)
+{
+       struct tizen_private *private = NULL;
+       if (egl_window == NULL) {
+               WL_EGL_ERR("egl_window is NULL");
+               return;
+       }
+
+       if (!egl_window->driver_private) {
+               private = tizen_private_create();
+               if (!private) {
+                       WL_EGL_ERR("Failed to create tizen_private.");
+                       return;
+               }
+
+               egl_window->driver_private = (void *)private;
+       } else {
+               private = (struct tizen_private *)egl_window->driver_private;
+       }
+
+       if (private->rotation == rotation) {
+               WL_EGL_LOG(2, "rotation(%d) egl_window->rotation(%d) already rotated",
+                                  rotation, private->rotation);
+               return;
+       }
+
+       private->rotation = rotation;
+
+       if (private->rotate_callback)
+               private->rotate_callback(egl_window, egl_window->driver_private);
+}
+
+int
+wl_egl_window_tizen_get_capabilities(struct wl_egl_window *egl_window)
+{
+       struct tizen_private *private = NULL;
+       int capabilities = WL_EGL_WINDOW_TIZEN_CAPABILITY_NONE;
+
+       if (egl_window == NULL) {
+               WL_EGL_ERR("egl_window is NULL");
+               return -1;
+       }
+
+       if (!egl_window->driver_private) {
+               private = tizen_private_create();
+               if (!private) {
+                       WL_EGL_ERR("Failed to create tizen_private.");
+                       return -1;
+               }
+
+               egl_window->driver_private = (void *)private;
+       } else {
+               private = (struct tizen_private *)egl_window->driver_private;
+       }
+
+       if (private->get_rotation_capability)
+               capabilities = private->get_rotation_capability(egl_window, egl_window->driver_private);
+       else
+               capabilities = WL_EGL_WINDOW_TIZEN_CAPABILITY_ROTATION_UNKNOWN;
+
+       return capabilities;
+}
+
+void
+wl_egl_window_tizen_set_buffer_transform(struct wl_egl_window *egl_window,
+                                                                                int wl_output_transform)
+{
+       struct tizen_private *private = NULL;
+       if (egl_window == NULL) {
+               WL_EGL_ERR("egl_window is NULL");
+               return;
+       }
+
+       if (!egl_window->driver_private) {
+               private = tizen_private_create();
+               if (!private) {
+                       WL_EGL_ERR("Failed to create tizen_private.");
+                       return;
+               }
+
+               egl_window->driver_private = (void *)private;
+       } else {
+               private = (struct tizen_private *)egl_window->driver_private;
+       }
+
+       if (private->transform == wl_output_transform) {
+               WL_EGL_LOG(2,
+                                  "wl_output_transform(%d) private->transform(%d) already rotated",
+                                  wl_output_transform, private->transform);
+               return;
+       }
+
+       private->transform = wl_output_transform;
+}
+
+void
+wl_egl_window_tizen_set_frontbuffer_mode(struct wl_egl_window *egl_window,
+                                                                                int set)
+{
+       struct tizen_private *private = NULL;
+       if (egl_window == NULL) {
+               WL_EGL_ERR("egl_window is NULL");
+               return;
+       }
+
+       if (!egl_window->driver_private) {
+               private = tizen_private_create();
+               if (!private) {
+                       WL_EGL_ERR("Failed to create tizen_private.");
+                       return;
+               }
+
+               egl_window->driver_private = (void *)private;
+       } else {
+               private = (struct tizen_private *)egl_window->driver_private;
+       }
+
+       private->frontbuffer_mode = set;
+
+       if (private->set_frontbuffer_callback)
+               private->set_frontbuffer_callback(egl_window, egl_window->driver_private,
+                                                                                 set);
+}
+
+void
+wl_egl_window_tizen_set_window_transform(struct wl_egl_window *egl_window,
+                                                                                int window_transform)
+{
+       struct tizen_private *private = NULL;
+       if (egl_window == NULL) {
+               WL_EGL_ERR("egl_window is NULL");
+               return;
+       }
+
+       if (!egl_window->driver_private) {
+               private = tizen_private_create();
+               if (!private) {
+                       WL_EGL_ERR("Failed to create tizen_private.");
+                       return;
+               }
+
+               egl_window->driver_private = (void *)private;
+       } else {
+               private = (struct tizen_private *)egl_window->driver_private;
+       }
+
+       if (private->window_transform == window_transform) {
+               WL_EGL_LOG(2,
+                                  "window_transform(%d)  already rotated",
+                                  window_transform);
+               return;
+       }
+
+       private->window_transform = window_transform;
+}
+
+unsigned int
+wl_egl_window_tizen_get_window_serial(struct wl_egl_window *egl_window)
+{
+       struct tizen_private *private = NULL;
+       if (egl_window == NULL) {
+               WL_EGL_ERR("egl_window is NULL");
+               return 0;
+       }
+
+       if (!egl_window->driver_private) {
+               private = tizen_private_create();
+               if (!private) {
+                       WL_EGL_ERR("Failed to create tizen_private.");
+                       return 0;
+               }
+
+               egl_window->driver_private = (void *)private;
+       } else {
+               private = (struct tizen_private *)egl_window->driver_private;
+       }
+
+       return private->serial;
+}
+
+void
+wl_egl_window_tizen_set_window_serial(struct wl_egl_window *egl_window,
+                                                                         unsigned int serial)
+{
+       struct tizen_private *private = NULL;
+       if (egl_window == NULL) {
+               WL_EGL_ERR("egl_window is NULL");
+               return;
+       }
+
+       private = egl_window->driver_private;
+       if (private == NULL) {
+               WL_EGL_ERR("wl_egl_window(%p) dirver_private is NULL", egl_window);
+               return;
+       }
+
+       if (private->set_window_serial_callback)
+               private->set_window_serial_callback(egl_window, egl_window->driver_private,
+                                                                                       serial);
+}
\ No newline at end of file
diff --git a/src/wayland-egl-tizen/wayland-egl-tizen.h b/src/wayland-egl-tizen/wayland-egl-tizen.h
new file mode 100644 (file)
index 0000000..b305e27
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Copyright © 2011 Kristian Høgsberg
+ * Copyright © 2011 Benjamin Franzke
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#ifndef WAYLAND_EGL_TIZEN_H
+#define WAYLAND_EGL_TIZEN_H
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
+#include <wayland-egl.h>
+
+typedef enum {
+       WL_EGL_WINDOW_TIZEN_CAPABILITY_NONE = 0,
+       WL_EGL_WINDOW_TIZEN_CAPABILITY_ROTATION_SUPPORTED = (1 << 0),
+       WL_EGL_WINDOW_TIZEN_CAPABILITY_ROTATION_UNSUPPORTED = (1 << 1),
+       WL_EGL_WINDOW_TIZEN_CAPABILITY_ROTATION_UNKNOWN = (1 << 2),
+} wl_egl_window_tizen_capability;
+
+typedef enum {
+       WL_EGL_WINDOW_TIZEN_ROTATION_0 = 0,
+       WL_EGL_WINDOW_TIZEN_ROTATION_90 = 90,
+       WL_EGL_WINDOW_TIZEN_ROTATION_180 = 180,
+       WL_EGL_WINDOW_TIZEN_ROTATION_270 = 270
+} wl_egl_window_tizen_rotation;
+
+void
+wl_egl_window_tizen_set_rotation(struct wl_egl_window *egl_window,
+                                                                int rotation);
+
+int
+wl_egl_window_tizen_get_capabilities(struct wl_egl_window *egl_window);
+
+void
+wl_egl_window_tizen_set_buffer_transform(struct wl_egl_window *egl_window,
+                                                                                int wl_output_transform);
+
+void
+wl_egl_window_tizen_set_frontbuffer_mode(struct wl_egl_window *egl_window,
+                                                                                int set);
+
+void
+wl_egl_window_tizen_set_window_transform(struct wl_egl_window *egl_window,
+                                                                                int window_transform);
+
+unsigned int
+wl_egl_window_tizen_get_window_serial(struct wl_egl_window *egl_window);
+
+void
+wl_egl_window_tizen_set_window_serial(struct wl_egl_window *egl_window,
+                                                                         unsigned int serial);
+
+#ifdef  __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/wayland-egl/Makefile.am b/src/wayland-egl/Makefile.am
deleted file mode 100644 (file)
index f08f23d..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-libwayland_egl_tizen_la_LTLIBRARIES = libwayland-egl-tizen.la
-libwayland_egl_tizen_ladir = $(libdir)
-
-libwayland_egl_tizen_lainclude_HEADERS = wayland-egl-tizen.h
-libwayland_egl_tizen_laincludedir = $(includedir)
-
-libwayland_egl_tizen_la_CFLAGS = -I$(srcdir)   \
-                                                                @WL_EGL_TIZEN_CFLAGS@
-
-libwayland_egl_tizen_la_LIBADD = @WL_EGL_TIZEN_LIBS@
-libwayland_egl_tizen_la_LDFLAGS = -version-number @WL_EGL_TIZEN_VERSION_MAJOR@:@WL_EGL_TIZEN_VERSION_MINOR@:@WL_EGL_TIZEN_VERSION_PATCH@
-libwayland_egl_tizen_la_SOURCES = wayland-egl-tizen.c
diff --git a/src/wayland-egl/wayland-egl-tizen-priv.h b/src/wayland-egl/wayland-egl-tizen-priv.h
deleted file mode 100644 (file)
index 5b65a70..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#ifndef _WAYLAND_EGL_TIZEN_PRIV_H
-#define _WAYLAND_EGL_TIZEN_PRIV_H
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-#include <stdlib.h>
-#include <wayland-client.h>
-#include <wayland-egl.h>
-
-struct tizen_private {
-       int rotation;
-       int frontbuffer_mode;
-       int transform;
-       int window_transform;
-       unsigned int serial;
-
-       void *data;
-
-    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);
-};
-
-static struct tizen_private* tizen_private_create()
-{
-       struct tizen_private *private = NULL;
-       private = (struct tizen_private *)calloc(1, sizeof(struct tizen_private));
-       if (private) {
-               private->rotation = 0;
-               private->frontbuffer_mode = 0;
-               private->transform = 0;
-               private->window_transform = 0;
-               private->serial = 0;
-
-               private->data = NULL;
-               private->rotate_callback = NULL;
-               private->get_rotation_capability = NULL;
-               private->set_window_serial_callback = NULL;
-               private->set_frontbuffer_callback = NULL;
-       }
-
-       return private;
-}
-
-#ifdef  __cplusplus
-}
-#endif
-
-#endif
diff --git a/src/wayland-egl/wayland-egl-tizen.c b/src/wayland-egl/wayland-egl-tizen.c
deleted file mode 100644 (file)
index 4c127bc..0000000
+++ /dev/null
@@ -1,253 +0,0 @@
-#include <wayland-egl.h>
-#include <wayland-egl-backend.h>
-#include "wayland-egl-tizen.h"
-#include "wayland-egl-tizen-priv.h"
-
-#define WL_EGL_DEBUG 1
-#if WL_EGL_DEBUG
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/syscall.h>
-#include <sys/types.h>
-#include <signal.h>
-
-unsigned int wl_egl_log_level;
-
-/* WL-EGL Log Level - 0:unintialized, 1:initialized(no logging), 2:min log, 3:more log */
-#define WL_EGL_LOG(lvl, f, x...) {                                                             \
-               if (wl_egl_log_level == 1) {                                                    \
-               }                                                                                                               \
-               else if (wl_egl_log_level > 1) {                                                \
-                       if (wl_egl_log_level <= lvl)                                            \
-                               WL_EGL_LOG_PRINT(f, ##x)                                                \
-               }                                                                                                               \
-               else {                                                                                                  \
-                       char *env = getenv("WL_EGL_LOG_LEVEL");                         \
-                       if (env == NULL)                                                                        \
-                               wl_egl_log_level = 1;                                                   \
-                       else                                                                                            \
-                               wl_egl_log_level = atoi(env);                                   \
-                                                                                                                               \
-                       if (wl_egl_log_level > 1 && wl_egl_log_level <= lvl)\
-                               WL_EGL_LOG_PRINT(f, ##x)                                                \
-               }                                                                                                               \
-       }
-
-#define WL_EGL_LOG_PRINT(fmt, args...) {                                                                               \
-               printf("[\x1b[32mWL-EGL\x1b[0m %d:%d|\x1b[32m%s\x1b[0m|%d] " fmt "\n",  \
-                       getpid(), (int)syscall(SYS_gettid), __func__, __LINE__, ##args);        \
-       }
-
-#define WL_EGL_ERR(f, x...)    {                                                                                                       \
-               printf("[\x1b[31mWL-EGL_ERR\x1b[0m %d:%d|\x1b[31m%s\x1b[0m|%d] " f "\n",\
-                       getpid(), (int)syscall(SYS_gettid), __func__, __LINE__, ##x);           \
-       }
-
-#else
-#define WL_EGL_LOG(lvl, f, x...)
-#endif
-
-void
-wl_egl_window_tizen_set_rotation(struct wl_egl_window *egl_window,
-                                                                int rotation)
-{
-       struct tizen_private *private = NULL;
-       if (egl_window == NULL) {
-               WL_EGL_ERR("egl_window is NULL");
-               return;
-       }
-
-       if (!egl_window->driver_private) {
-               private = tizen_private_create();
-               if (!private) {
-                       WL_EGL_ERR("Failed to create tizen_private.");
-                       return;
-               }
-
-               egl_window->driver_private = (void *)private;
-       } else {
-               private = (struct tizen_private *)egl_window->driver_private;
-       }
-
-       if (private->rotation == rotation) {
-               WL_EGL_LOG(2, "rotation(%d) egl_window->rotation(%d) already rotated",
-                                  rotation, private->rotation);
-               return;
-       }
-
-       private->rotation = rotation;
-
-       if (private->rotate_callback)
-               private->rotate_callback(egl_window, egl_window->driver_private);
-}
-
-int
-wl_egl_window_tizen_get_capabilities(struct wl_egl_window *egl_window)
-{
-       struct tizen_private *private = NULL;
-       int capabilities = WL_EGL_WINDOW_TIZEN_CAPABILITY_NONE;
-
-       if (egl_window == NULL) {
-               WL_EGL_ERR("egl_window is NULL");
-               return -1;
-       }
-
-       if (!egl_window->driver_private) {
-               private = tizen_private_create();
-               if (!private) {
-                       WL_EGL_ERR("Failed to create tizen_private.");
-                       return -1;
-               }
-
-               egl_window->driver_private = (void *)private;
-       } else {
-               private = (struct tizen_private *)egl_window->driver_private;
-       }
-
-       if (private->get_rotation_capability)
-               capabilities = private->get_rotation_capability(egl_window, egl_window->driver_private);
-       else
-               capabilities = WL_EGL_WINDOW_TIZEN_CAPABILITY_ROTATION_UNKNOWN;
-
-       return capabilities;
-}
-
-void
-wl_egl_window_tizen_set_buffer_transform(struct wl_egl_window *egl_window,
-                                                                                int wl_output_transform)
-{
-       struct tizen_private *private = NULL;
-       if (egl_window == NULL) {
-               WL_EGL_ERR("egl_window is NULL");
-               return;
-       }
-
-       if (!egl_window->driver_private) {
-               private = tizen_private_create();
-               if (!private) {
-                       WL_EGL_ERR("Failed to create tizen_private.");
-                       return;
-               }
-
-               egl_window->driver_private = (void *)private;
-       } else {
-               private = (struct tizen_private *)egl_window->driver_private;
-       }
-
-       if (private->transform == wl_output_transform) {
-               WL_EGL_LOG(2,
-                                  "wl_output_transform(%d) private->transform(%d) already rotated",
-                                  wl_output_transform, private->transform);
-               return;
-       }
-
-       private->transform = wl_output_transform;
-}
-
-void
-wl_egl_window_tizen_set_frontbuffer_mode(struct wl_egl_window *egl_window,
-                                                                                int set)
-{
-       struct tizen_private *private = NULL;
-       if (egl_window == NULL) {
-               WL_EGL_ERR("egl_window is NULL");
-               return;
-       }
-
-       if (!egl_window->driver_private) {
-               private = tizen_private_create();
-               if (!private) {
-                       WL_EGL_ERR("Failed to create tizen_private.");
-                       return;
-               }
-
-               egl_window->driver_private = (void *)private;
-       } else {
-               private = (struct tizen_private *)egl_window->driver_private;
-       }
-
-       private->frontbuffer_mode = set;
-
-       if (private->set_frontbuffer_callback)
-               private->set_frontbuffer_callback(egl_window, egl_window->driver_private,
-                                                                                 set);
-}
-
-void
-wl_egl_window_tizen_set_window_transform(struct wl_egl_window *egl_window,
-                                                                                int window_transform)
-{
-       struct tizen_private *private = NULL;
-       if (egl_window == NULL) {
-               WL_EGL_ERR("egl_window is NULL");
-               return;
-       }
-
-       if (!egl_window->driver_private) {
-               private = tizen_private_create();
-               if (!private) {
-                       WL_EGL_ERR("Failed to create tizen_private.");
-                       return;
-               }
-
-               egl_window->driver_private = (void *)private;
-       } else {
-               private = (struct tizen_private *)egl_window->driver_private;
-       }
-
-       if (private->window_transform == window_transform) {
-               WL_EGL_LOG(2,
-                                  "window_transform(%d)  already rotated",
-                                  window_transform);
-               return;
-       }
-
-       private->window_transform = window_transform;
-}
-
-unsigned int
-wl_egl_window_tizen_get_window_serial(struct wl_egl_window *egl_window)
-{
-       struct tizen_private *private = NULL;
-       if (egl_window == NULL) {
-               WL_EGL_ERR("egl_window is NULL");
-               return 0;
-       }
-
-       if (!egl_window->driver_private) {
-               private = tizen_private_create();
-               if (!private) {
-                       WL_EGL_ERR("Failed to create tizen_private.");
-                       return 0;
-               }
-
-               egl_window->driver_private = (void *)private;
-       } else {
-               private = (struct tizen_private *)egl_window->driver_private;
-       }
-
-       return private->serial;
-}
-
-void
-wl_egl_window_tizen_set_window_serial(struct wl_egl_window *egl_window,
-                                                                         unsigned int serial)
-{
-       struct tizen_private *private = NULL;
-       if (egl_window == NULL) {
-               WL_EGL_ERR("egl_window is NULL");
-               return;
-       }
-
-       private = egl_window->driver_private;
-       if (private == NULL) {
-               WL_EGL_ERR("wl_egl_window(%p) dirver_private is NULL", egl_window);
-               return;
-       }
-
-       if (private->set_window_serial_callback)
-               private->set_window_serial_callback(egl_window, egl_window->driver_private,
-                                                                                       serial);
-}
\ No newline at end of file
diff --git a/src/wayland-egl/wayland-egl-tizen.h b/src/wayland-egl/wayland-egl-tizen.h
deleted file mode 100644 (file)
index b305e27..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright © 2011 Kristian Høgsberg
- * Copyright © 2011 Benjamin Franzke
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sublicense, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef WAYLAND_EGL_TIZEN_H
-#define WAYLAND_EGL_TIZEN_H
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-#include <wayland-egl.h>
-
-typedef enum {
-       WL_EGL_WINDOW_TIZEN_CAPABILITY_NONE = 0,
-       WL_EGL_WINDOW_TIZEN_CAPABILITY_ROTATION_SUPPORTED = (1 << 0),
-       WL_EGL_WINDOW_TIZEN_CAPABILITY_ROTATION_UNSUPPORTED = (1 << 1),
-       WL_EGL_WINDOW_TIZEN_CAPABILITY_ROTATION_UNKNOWN = (1 << 2),
-} wl_egl_window_tizen_capability;
-
-typedef enum {
-       WL_EGL_WINDOW_TIZEN_ROTATION_0 = 0,
-       WL_EGL_WINDOW_TIZEN_ROTATION_90 = 90,
-       WL_EGL_WINDOW_TIZEN_ROTATION_180 = 180,
-       WL_EGL_WINDOW_TIZEN_ROTATION_270 = 270
-} wl_egl_window_tizen_rotation;
-
-void
-wl_egl_window_tizen_set_rotation(struct wl_egl_window *egl_window,
-                                                                int rotation);
-
-int
-wl_egl_window_tizen_get_capabilities(struct wl_egl_window *egl_window);
-
-void
-wl_egl_window_tizen_set_buffer_transform(struct wl_egl_window *egl_window,
-                                                                                int wl_output_transform);
-
-void
-wl_egl_window_tizen_set_frontbuffer_mode(struct wl_egl_window *egl_window,
-                                                                                int set);
-
-void
-wl_egl_window_tizen_set_window_transform(struct wl_egl_window *egl_window,
-                                                                                int window_transform);
-
-unsigned int
-wl_egl_window_tizen_get_window_serial(struct wl_egl_window *egl_window);
-
-void
-wl_egl_window_tizen_set_window_serial(struct wl_egl_window *egl_window,
-                                                                         unsigned int serial);
-
-#ifdef  __cplusplus
-}
-#endif
-
-#endif
index 0c864edeec85888d823739e639e72ac717791b94..574dd53cfd486a6495f72c38e829db1d25efc10b 100644 (file)
@@ -26,4 +26,4 @@ tpl_test_LDFLAGS = ${LDFLAGS} \
                                   @TPL_TEST_LIBS@
 
 tpl_test_LDADD = ../src/libtpl-egl.la  \
-                                ../src/wayland-egl/libwayland-egl.la
+                                ../src/wayland-egl-tizen/libwayland-egl-tizen.la
index b6989e781dadca58a2508673849a27b760ff1786..7caa7172b07b62dd62a3717621952e49d146e647 100644 (file)
@@ -9,17 +9,14 @@ LDFLAGS +=
 
 CFLAGS += -I../src
 
-CFLAGS += `pkg-config --cflags libtbm glib-2.0 wayland-tbm-client wayland-tbm-server libtdm-client`
-LDFLAGS += `pkg-config --libs libtbm glib-2.0 wayland-tbm-client wayland-tbm-server libtdm-client`
-
-WAYLAND_EGL_OBJ_PATH = ../src/wayland-egl/wayland-egl.o
+CFLAGS += `pkg-config --cflags libtbm glib-2.0 wayland-tbm-client wayland-tbm-server libtdm-client wayland-egl`
+LDFLAGS += `pkg-config --libs libtbm glib-2.0 wayland-tbm-client wayland-tbm-server libtdm-client wayland-egl`
 
 SRCS += $(SRC_DIR)/worker_test.c
 SRCS += ../src/tpl.c
 SRCS += ../src/tpl_utils_hlist.c
 SRCS += ../src/tpl_utils_map.c
 SRCS += ../src/tpl_object.c
-SRCS += ../src/wayland-egl/wayland-egl.c
 SRCS += ../src/tpl_wayland_egl_thread.c
 HEADERS += ../src/tpl_wayland_egl_thread.h
 HEADERS += ../src/tpl_utils.h
@@ -33,7 +30,7 @@ all : $(BIN_NAME)
 %.o: %.c
        $(CC) -c -o $@ $< $(CFLAGS) $(LDFLAGS)
 
-$(BIN_NAME) : $(OBJS) $(WAYLAND_EGL_OBJ_PATH) ${SRCS} $(HEADERS)
+$(BIN_NAME) : $(OBJS) ${SRCS} $(HEADERS)
        $(CC) ${SRCS} -o $@ $(CFLAGS) $(LDFLAGS)
 
 clean: