Make clear about use_explicit_sync feature flag. 66/271066/3
authorJoonbum Ko <joonbum.ko@samsung.com>
Tue, 15 Feb 2022 05:06:30 +0000 (14:06 +0900)
committerJoonbum Ko <joonbum.ko@samsung.com>
Tue, 15 Feb 2022 05:30:08 +0000 (14:30 +0900)
 - if the boolean flag use_explicit_sync is true,
  it includes the meaning surface_sync is not null.
 - so, it need to be simplified with using only
  use_explicit_sync flag.

Change-Id: Icdcc55a76d72b28d9bd38a96de1093ab56edc135
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
src/tpl_wl_egl_thread.c

index f439bd6..b8830a7 100755 (executable)
@@ -2574,7 +2574,7 @@ __tpl_wl_egl_surface_dequeue_buffer(tpl_surface_t *surface, uint64_t timeout_ns,
         * If not, user(EGL) have to wait until signaled. */
        if (release_fence) {
 #if TIZEN_FEATURE_ENABLE
-               if (wl_egl_surface->surface_sync) {
+               if (wl_egl_display->use_explicit_sync) {
                        *release_fence = wl_egl_buffer->release_fence_fd;
                        TPL_DEBUG("wl_egl_surface(%p) wl_egl_buffer(%p) release_fence_fd(%d)",
                                          wl_egl_surface, wl_egl_buffer, *release_fence);
@@ -2869,7 +2869,7 @@ _thread_surface_queue_acquire(tpl_wl_egl_surface_t *wl_egl_surface)
 
                if (wl_egl_buffer->acquire_fence_fd != -1) {
 #if TIZEN_FEATURE_ENABLE
-                       if (wl_egl_surface->surface_sync)
+                       if (wl_egl_display->use_explicit_sync)
                                ready_to_commit = TPL_TRUE;
                        else
 #endif
@@ -3280,7 +3280,7 @@ _thread_wl_surface_commit(tpl_wl_egl_surface_t *wl_egl_surface,
 
 #if TIZEN_FEATURE_ENABLE
                if (!wl_egl_display->use_explicit_sync ||
-                       !wl_egl_surface->surface_sync)
+                       wl_egl_buffer->acquire_fence_fd == -1)
 #endif
                {
                        wl_buffer_add_listener((struct wl_buffer *)wl_egl_buffer->wl_buffer,
@@ -3395,7 +3395,7 @@ _thread_wl_surface_commit(tpl_wl_egl_surface_t *wl_egl_surface,
                                                wl_egl_buffer->serial);
 #if TIZEN_FEATURE_ENABLE
        if (wl_egl_display->use_explicit_sync &&
-               wl_egl_surface->surface_sync) {
+               wl_egl_buffer->acquire_fence_fd != -1) {
 
                zwp_linux_surface_synchronization_v1_set_acquire_fence(wl_egl_surface->surface_sync,
                                                                                                                           wl_egl_buffer->acquire_fence_fd);