Changed to wait until ENQUEUE becomes FENCE_SIGNALED. 97/254997/1
authorJoonbum Ko <joonbum.ko@samsung.com>
Thu, 11 Mar 2021 07:03:14 +0000 (16:03 +0900)
committerJoonbum Ko <joonbum.ko@samsung.com>
Thu, 11 Mar 2021 07:03:16 +0000 (16:03 +0900)
 - It is not safe to force close before being SIGNALED status
  because it is a fence fd delivered from driver.
 - Therefore, it is desirable to destroy all buffers
  when SIGNALED status is guaranteed.

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

index fdc70d6..17cc5cf 100755 (executable)
@@ -1875,7 +1875,8 @@ _tpl_wl_egl_surface_buffer_clear(tpl_wl_egl_surface_t *wl_egl_surface)
                 * so cancel_dequeue must be performed. */
                need_to_cancel = wl_egl_buffer->status == DEQUEUED;
 
-               if (wl_egl_buffer->status == WAITING_SIGNALED) {
+               if (wl_egl_buffer->status >= ENQUEUED &&
+                       wl_egl_buffer->status < WAITING_VBLANK) {
                        tpl_result_t wait_result = TPL_ERROR_NONE;
                        tpl_gmutex_unlock(&wl_egl_display->wl_event_mutex);
                        wait_result = tpl_cond_timed_wait(&wl_egl_buffer->cond,