wayland_egl_tizen: Move tizen_private_create() to each backend. 39/266139/1
authorJoonbum Ko <joonbum.ko@samsung.com>
Tue, 28 Sep 2021 08:03:57 +0000 (17:03 +0900)
committerJoonbum Ko <joonbum.ko@samsung.com>
Mon, 8 Nov 2021 06:36:00 +0000 (15:36 +0900)
 - Move the function implementation of tizen_private_create()
  to each backend.
 - Since wl_egl_window_tizen APIs are not used anymore,
  it is not necessary to provide in wayland-egl-tizen-priv.h

Change-Id: I9309914f4c7a2c3267b5fd1edf844c25e866e64a
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
src/tpl_wayland_egl.c
src/tpl_wl_egl_thread.c
src/wayland-egl-tizen/wayland-egl-tizen-priv.h

index 3ff1817..113159d 100755 (executable)
@@ -104,6 +104,32 @@ static void
 __tpl_wayland_egl_buffer_free(tpl_wayland_egl_buffer_t *wayland_egl_buffer);
 
 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->magic = WL_EGL_TIZEN_MAGIC;
+               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;
+               private->create_commit_sync_fd = NULL;
+               private->create_presentation_sync_fd = NULL;
+               private->merge_sync_fds = NULL;
+       }
+
+       return private;
+}
+
+static struct tizen_private *
 _get_tizen_private(struct wl_egl_window * wl_egl_window)
 {
        if (wl_egl_window && wl_egl_window->driver_private)
index 926f669..ac8d2c4 100755 (executable)
@@ -266,6 +266,32 @@ _thread_wl_surface_commit(tpl_wl_egl_surface_t *wl_egl_surface,
 static void
 __cb_surface_vblank_free(void *data);
 
+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->magic = WL_EGL_TIZEN_MAGIC;
+               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;
+               private->create_commit_sync_fd = NULL;
+               private->create_presentation_sync_fd = NULL;
+               private->merge_sync_fds = NULL;
+       }
+
+       return private;
+}
+
 static tpl_bool_t
 _check_native_handle_is_wl_display(tpl_handle_t display)
 {
index af307da..1d7f834 100644 (file)
@@ -32,32 +32,6 @@ struct tizen_private {
        int (*merge_sync_fds)(void *, int, 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->magic = WL_EGL_TIZEN_MAGIC;
-               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;
-               private->create_commit_sync_fd = NULL;
-               private->create_presentation_sync_fd = NULL;
-               private->merge_sync_fds = NULL;
-       }
-
-       return private;
-}
-
 #ifdef  __cplusplus
 }
 #endif