wayland_egl_tizen: Move tizen_private_create() to each backend. 92/264692/1
authorJoonbum Ko <joonbum.ko@samsung.com>
Tue, 28 Sep 2021 08:03:57 +0000 (17:03 +0900)
committerJoonbum Ko <joonbum.ko@samsung.com>
Tue, 28 Sep 2021 08:03:59 +0000 (17:03 +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 3ff1817a5b6cd4c8a3a0d3977d6e732156e2d987..113159d63ffa1099b5c4e0529ad7d570d9584e87 100755 (executable)
@@ -103,6 +103,32 @@ __tpl_wayland_egl_surface_buffer_flusher_fini(tpl_surface_t *surface);
 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)
 {
index 926f6691f66fe25c7581b5d28b6845bb42a9d2c5..ac8d2c47b3f138821bc3709b65a340812325164e 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 af307daa18c39d63db08ada5446c5ba2c9aa207e..1d7f834f0df46f746451f111e75c9fdca797f9cb 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