Fix some wrong indentations 68/254868/2
authorJoonbum Ko <joonbum.ko@samsung.com>
Wed, 10 Mar 2021 06:49:47 +0000 (15:49 +0900)
committerJoonbum Ko <joonbum.ko@samsung.com>
Wed, 10 Mar 2021 06:57:42 +0000 (15:57 +0900)
Change-Id: I936059980b41c6abf7fa9be58d9f41032c7a373f
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
src/tpl_wl_egl_thread.c

index 1cd44b8..2cbb72d 100755 (executable)
@@ -43,7 +43,7 @@ struct _tpl_wl_egl_display {
        tpl_gthread                  *thread;
        tpl_gmutex                    wl_event_mutex;
 
-    struct wl_display            *wl_display;
+       struct wl_display            *wl_display;
        struct wl_event_queue        *ev_queue;
        struct wayland_tbm_client    *wl_tbm_client;
        int                           last_error; /* errno of the last wl_display error*/
@@ -359,11 +359,12 @@ __cb_wl_resistry_global_callback(void *data, struct wl_registry *wl_registry,
        tpl_wl_egl_display_t *wl_egl_display = (tpl_wl_egl_display_t *)data;
 
        if (!strcmp(interface, "tizen_surface_shm")) {
-               wl_egl_display->tss = wl_registry_bind(wl_registry,
-                                                                                       name,
-                                                                                       &tizen_surface_shm_interface,
-                                                                                       ((version < IMPL_TIZEN_SURFACE_SHM_VERSION) ?
-                                                                                        version : IMPL_TIZEN_SURFACE_SHM_VERSION));
+               wl_egl_display->tss =
+                       wl_registry_bind(wl_registry,
+                                                        name,
+                                                        &tizen_surface_shm_interface,
+                                                        ((version < IMPL_TIZEN_SURFACE_SHM_VERSION) ?
+                                                        version : IMPL_TIZEN_SURFACE_SHM_VERSION));
        } else if (!strcmp(interface, wp_presentation_interface.name)) {
                wl_egl_display->presentation =
                                        wl_registry_bind(wl_registry,
@@ -783,7 +784,7 @@ __tpl_wl_egl_display_init(tpl_display_t *display)
        wl_egl_display->explicit_sync     = NULL;
        wl_egl_display->wl_tbm_client     = NULL;
 
-       wl_egl_display->use_wait_vblank   = TPL_TRUE;    // default enabled
+       wl_egl_display->use_wait_vblank   = TPL_TRUE;   // default enabled
        {
                char *env = tpl_getenv("TPL_WAIT_VBLANK");
                if (env && !atoi(env)) {
@@ -1014,6 +1015,7 @@ tpl_bool_t
 __tpl_display_choose_backend_wl_egl_thread2(tpl_handle_t native_dpy)
 {
        struct wl_interface *wl_egl_native_dpy = *(void **) native_dpy;
+
        TPL_CHECK_ON_NULL_RETURN_VAL(wl_egl_native_dpy, TPL_FALSE);
 
        /* MAGIC CHECK: A native display handle is a wl_display if the de-referenced first value
@@ -1033,7 +1035,7 @@ __tpl_display_choose_backend_wl_egl_thread2(tpl_handle_t native_dpy)
 static void
 __cb_destroy_callback(void *private)
 {
-       struct tizen_private *tizen_private = (struct tizen_private *)private;
+       struct tizen_private *tizen_private  = (struct tizen_private *)private;
        tpl_wl_egl_surface_t *wl_egl_surface = NULL;
 
        if (!tizen_private) {
@@ -1074,7 +1076,7 @@ __cb_resize_callback(struct wl_egl_window *wl_egl_window, void *private)
        TPL_ASSERT(private);
        TPL_ASSERT(wl_egl_window);
 
-       struct tizen_private *tizen_private = (struct tizen_private *)private;
+       struct tizen_private *tizen_private  = (struct tizen_private *)private;
        tpl_wl_egl_surface_t *wl_egl_surface = (tpl_wl_egl_surface_t *)tizen_private->data;
        int cur_w, cur_h, req_w, req_h, format;
 
@@ -1111,7 +1113,7 @@ __cb_rotate_callback(struct wl_egl_window *wl_egl_window, void *private)
        TPL_ASSERT(private);
        TPL_ASSERT(wl_egl_window);
 
-       struct tizen_private *tizen_private = (struct tizen_private *)private;
+       struct tizen_private *tizen_private  = (struct tizen_private *)private;
        tpl_wl_egl_surface_t *wl_egl_surface = (tpl_wl_egl_surface_t *)tizen_private->data;
        int rotation = tizen_private->rotation;
 
@@ -1137,8 +1139,8 @@ __cb_get_rotation_capability(struct wl_egl_window *wl_egl_window,
        TPL_ASSERT(private);
        TPL_ASSERT(wl_egl_window);
 
-       int rotation_capability = WL_EGL_WINDOW_TIZEN_CAPABILITY_NONE;
-       struct tizen_private *tizen_private = (struct tizen_private *)private;
+       int rotation_capability              = WL_EGL_WINDOW_TIZEN_CAPABILITY_NONE;
+       struct tizen_private *tizen_private  = (struct tizen_private *)private;
        tpl_wl_egl_surface_t *wl_egl_surface = (tpl_wl_egl_surface_t *)tizen_private->data;
 
        if (!wl_egl_surface) {
@@ -1163,7 +1165,7 @@ __cb_set_window_serial_callback(struct wl_egl_window *wl_egl_window,
        TPL_ASSERT(private);
        TPL_ASSERT(wl_egl_window);
 
-       struct tizen_private *tizen_private = (struct tizen_private *)private;
+       struct tizen_private *tizen_private  = (struct tizen_private *)private;
        tpl_wl_egl_surface_t *wl_egl_surface = (tpl_wl_egl_surface_t *)tizen_private->data;
 
        if (!wl_egl_surface) {
@@ -1184,7 +1186,7 @@ __cb_create_commit_sync_fd(struct wl_egl_window *wl_egl_window, void *private)
 
        int commit_sync_fd = -1;
 
-       struct tizen_private *tizen_private = (struct tizen_private *)private;
+       struct tizen_private *tizen_private  = (struct tizen_private *)private;
        tpl_wl_egl_surface_t *wl_egl_surface = (tpl_wl_egl_surface_t *)tizen_private->data;
 
        if (!wl_egl_surface) {
@@ -1206,7 +1208,8 @@ __cb_create_commit_sync_fd(struct wl_egl_window *wl_egl_window, void *private)
 
        wl_egl_surface->commit_sync.fd = eventfd(0, EFD_CLOEXEC);
        if (wl_egl_surface->commit_sync.fd == -1) {
-               TPL_ERR("Failed to create commit_sync_fd. wl_egl_surface(%p)", wl_egl_surface);
+               TPL_ERR("Failed to create commit_sync_fd. wl_egl_surface(%p)",
+                               wl_egl_surface);
                tpl_gmutex_unlock(&wl_egl_surface->commit_sync.mutex);
                return -1;
        }
@@ -1231,7 +1234,7 @@ __cb_create_presentation_sync_fd(struct wl_egl_window *wl_egl_window, void *priv
 
        int presentation_sync_fd = -1;
 
-       struct tizen_private *tizen_private = (struct tizen_private *)private;
+       struct tizen_private *tizen_private  = (struct tizen_private *)private;
        tpl_wl_egl_surface_t *wl_egl_surface = (tpl_wl_egl_surface_t *)tizen_private->data;
 
        if (!wl_egl_surface) {
@@ -1252,7 +1255,8 @@ __cb_create_presentation_sync_fd(struct wl_egl_window *wl_egl_window, void *priv
 
        wl_egl_surface->presentation_sync.fd = eventfd(0, EFD_CLOEXEC);
        if (wl_egl_surface->presentation_sync.fd == -1) {
-               TPL_ERR("Failed to create presentation_sync_fd. wl_egl_surface(%p)", wl_egl_surface);
+               TPL_ERR("Failed to create presentation_sync_fd. wl_egl_surface(%p)",
+                               wl_egl_surface);
                tpl_gmutex_unlock(&wl_egl_surface->presentation_sync.mutex);
                return -1;
        }
@@ -1290,7 +1294,7 @@ static void __cb_tss_flusher_free_flush_callback(void *data,
                struct tizen_surface_shm_flusher *tss_flusher)
 {
        tpl_wl_egl_surface_t *wl_egl_surface = (tpl_wl_egl_surface_t *)data;
-       tbm_surface_queue_error_e tsq_err = TBM_SURFACE_QUEUE_ERROR_NONE;
+       tbm_surface_queue_error_e tsq_err    = TBM_SURFACE_QUEUE_ERROR_NONE;
 
                TPL_INFO("[FREE_BUFFER_FLUSH]", "wl_egl_surface(%p) tbm_queue(%p)",
                                 wl_egl_surface, wl_egl_surface->tbm_queue);
@@ -1722,7 +1726,7 @@ _thread_create_tbm_queue(tpl_wl_egl_surface_t *wl_egl_surface,
                                                 int num_buffers)
 {
        tbm_surface_queue_h tbm_queue = NULL;
-       tbm_bufmgr bufmgr = NULL;
+       tbm_bufmgr bufmgr             = NULL;
        unsigned int capability;
 
        struct wl_surface *wl_surface = wl_egl_surface->wl_surface;
@@ -2763,8 +2767,8 @@ __cb_buffer_immediate_release(void *data,
 }
 
 static const struct zwp_linux_buffer_release_v1_listener zwp_release_listner = {
-       __cb_buffer_fenced_release,
-       __cb_buffer_immediate_release,
+       __cb_buffer_fenced_release,
+       __cb_buffer_immediate_release,
 };
 
 static void
@@ -2816,8 +2820,8 @@ static const struct wl_buffer_listener wl_buffer_release_listener = {
 
 static void
 __cb_presentation_feedback_sync_output(void *data,
-                    struct wp_presentation_feedback *presentation_feedback,
-                    struct wl_output *output)
+                       struct wp_presentation_feedback *presentation_feedback,
+                       struct wl_output *output)
 {
        TPL_IGNORE(data);
        TPL_IGNORE(presentation_feedback);
@@ -3260,7 +3264,7 @@ _get_tbm_surface_bo_name(tbm_surface_h tbm_surface)
 static void
 _print_buffer_lists(tpl_wl_egl_surface_t *wl_egl_surface)
 {
-       int idx                     = 0;
+       int idx = 0;
 
        tpl_gmutex_lock(&wl_egl_surface->buffers_mutex);
        TPL_INFO("[BUFFERS_INFO]", "wl_egl_surface(%p) buffer_cnt(%d)",