From d071a1c9a30e96f11bbca25a57e2adea2a418e22 Mon Sep 17 00:00:00 2001 From: "jinbong, Lee" Date: Fri, 17 Mar 2023 19:27:02 +0900 Subject: [PATCH] wl_egl : remive wl_egl_buffer in vblank's waiting buffers when wl_egl_buffer is freed - Bug fix . if __cb_wl_egl_buffer_free is called then some wl_egl_buffer can be in waiting buffers for vblank. so it must be removed it before wl_egl_buffer is freed. Change-Id: Ia08a7ecc6dcfd8f9d63e644b7cb733740672666b --- src/tpl_wl_egl_thread.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/tpl_wl_egl_thread.c b/src/tpl_wl_egl_thread.c index 681b8ac..113a8a7 100755 --- a/src/tpl_wl_egl_thread.c +++ b/src/tpl_wl_egl_thread.c @@ -3661,6 +3661,14 @@ __cb_wl_egl_buffer_free(tpl_wl_egl_buffer_t *wl_egl_buffer) } tpl_gmutex_unlock(&wl_egl_surface->buffers_mutex); + if (wl_egl_surface->vblank) { + tpl_gmutex_lock(&wl_egl_surface->vblank->mutex); + if (wl_egl_surface->vblank->waiting_buffers) + __tpl_list_remove_data(wl_egl_surface->vblank->waiting_buffers, (void *)wl_egl_buffer, + TPL_FIRST, NULL); + tpl_gmutex_unlock(&wl_egl_surface->vblank->mutex); + } + if (wl_egl_display) { if (wl_egl_buffer->wl_buffer) { wayland_tbm_client_destroy_buffer(wl_egl_display->wl_tbm_client, -- 2.7.4