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
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
#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
#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"
--- /dev/null
+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
--- /dev/null
+#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
--- /dev/null
+#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
--- /dev/null
+/*
+ * 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
+++ /dev/null
-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
+++ /dev/null
-#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
+++ /dev/null
-#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
+++ /dev/null
-/*
- * 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
@TPL_TEST_LIBS@
tpl_test_LDADD = ../src/libtpl-egl.la \
- ../src/wayland-egl/libwayland-egl.la
+ ../src/wayland-egl-tizen/libwayland-egl-tizen.la
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
%.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: