Fix a problem with overwriting fence fd with -1. 92/255092/1
authorJoonbum Ko <joonbum.ko@samsung.com>
Fri, 12 Mar 2021 02:17:25 +0000 (11:17 +0900)
committerJoonbum Ko <joonbum.ko@samsung.com>
Fri, 12 Mar 2021 02:17:25 +0000 (11:17 +0900)
Change-Id: Iab7191b1ddd50a822b768529f577b1612f80e259
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
src/tpl_wl_egl_thread.c

index cc609a0..8618311 100755 (executable)
@@ -2132,14 +2132,7 @@ _wl_egl_buffer_init(tpl_wl_egl_buffer_t *wl_egl_buffer,
 
        wl_egl_buffer->draw_done                = TPL_FALSE;
        wl_egl_buffer->need_to_commit           = TPL_TRUE;
-
-       wl_egl_buffer->acquire_fence_fd         = -1;
-       wl_egl_buffer->release_fence_fd         = -1;
-       wl_egl_buffer->commit_sync_fd           = -1;
-       wl_egl_buffer->presentation_sync_fd     = -1;
-
        wl_egl_buffer->buffer_release           = NULL;
-
        wl_egl_buffer->transform                = tizen_private->transform;
 
        if (wl_egl_buffer->w_transform != tizen_private->window_transform) {
@@ -2194,6 +2187,11 @@ _wl_egl_buffer_create(tpl_wl_egl_surface_t *wl_egl_surface,
 
                wl_egl_buffer->status                   = RELEASED;
 
+               wl_egl_buffer->acquire_fence_fd         = -1;
+               wl_egl_buffer->commit_sync_fd           = -1;
+               wl_egl_buffer->presentation_sync_fd     = -1;
+               wl_egl_buffer->release_fence_fd         = -1;
+
                wl_egl_buffer->dx                       = wl_egl_window->dx;
                wl_egl_buffer->dy                       = wl_egl_window->dy;
                wl_egl_buffer->width                    = tbm_surface_get_width(tbm_surface);