From: Joonbum Ko Date: Mon, 9 Nov 2020 07:09:06 +0000 (+0900) Subject: Wait until all fences imported from outside are signaled. X-Git-Tag: submit/tizen/20201109.081659~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=73ffe63a2aea71b17faae0312d89755beaac5797;p=platform%2Fcore%2Fuifw%2Flibtpl-egl.git Wait until all fences imported from outside are signaled. Change-Id: I209b76c5badfb5c4881e8afd850e8b1db401d2a2 Signed-off-by: Joonbum Ko --- diff --git a/src/tpl_wayland_egl_thread.c b/src/tpl_wayland_egl_thread.c index cb62f4f..35305a7 100755 --- a/src/tpl_wayland_egl_thread.c +++ b/src/tpl_wayland_egl_thread.c @@ -3298,6 +3298,14 @@ twe_surface_del(twe_surface_h twe_surface) return TPL_ERROR_INVALID_PARAMETER; } + if (surf_source->use_sync_fence && surf_source->fence_waiting_sources) { + TPL_DEBUG("twe_surface(%p) is waiting for all fences to be signaled.", + surf_source); + while (!__tpl_list_is_empty(surf_source->fence_waiting_sources)) { + __tpl_util_sys_yield(); + } + } + TPL_LOG_T(BACKEND, "twe_surface(%p) will be destroyed in thread", twe_surface); surf_del_source = surf_source->surf_del_source;