From: jinbong, Lee Date: Mon, 18 Sep 2023 06:19:41 +0000 (+0900) Subject: Enqueued tbm_surface is needed to unref when surface's finalize is called X-Git-Tag: accepted/tizen/unified/20230920.072012~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=24bd311a2e3e019d4797f27eac800630ee8026db;p=platform%2Fcore%2Fuifw%2Flibtpl-egl.git Enqueued tbm_surface is needed to unref when surface's finalize is called - If main thread called __tpl_wl_egl_surface_fini(), then sometimes enqueued buffer can be remained before acquire. so in that case tbm_surface must be unreferenced. Change-Id: I3482feca808deec9c238d5ca32ee46c9ebeec401 --- diff --git a/src/tpl_wl_egl_thread.c b/src/tpl_wl_egl_thread.c index c927f6e..3a5fe4a 100755 --- a/src/tpl_wl_egl_thread.c +++ b/src/tpl_wl_egl_thread.c @@ -2194,7 +2194,7 @@ _tpl_wl_egl_surface_buffer_clear(tpl_wl_egl_surface_t *wl_egl_surface) tpl_gmutex_unlock(&wl_egl_buffer->mutex); - if (need_to_release || need_to_cancel) + if (need_to_release || need_to_cancel || status == ENQUEUED) tbm_surface_internal_unref(wl_egl_buffer->tbm_surface); }