From: joonbum.ko Date: Tue, 2 Jan 2018 06:10:38 +0000 (+0900) Subject: tpl_wayland_egl_thread: Fixed wrong codes in committed_buffers list. X-Git-Tag: submit/tizen/20180104.042406~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=37144dc23b3056ad32ee27eb807ab3d19a7d356e;p=platform%2Fcore%2Fuifw%2Flibtpl-egl.git tpl_wayland_egl_thread: Fixed wrong codes in committed_buffers list. Change-Id: Ice96bd544bb38800a6678c1c44bf79875fb26c5d Signed-off-by: joonbum.ko --- diff --git a/src/tpl_wayland_egl_thread.c b/src/tpl_wayland_egl_thread.c index 96dbb8c..ef91619 100644 --- a/src/tpl_wayland_egl_thread.c +++ b/src/tpl_wayland_egl_thread.c @@ -1224,8 +1224,6 @@ static void __cb_tss_flusher_flush_callback(void *data, */ if (surf_source->committed_buffers) { TPL_OBJECT_LOCK(&surf_source->obj); - __tpl_list_fini(surf_source->committed_buffers, - (tpl_free_func_t)__cb_buffer_remove_from_list); while (!__tpl_list_is_empty(surf_source->committed_buffers)) { tbm_surface_queue_error_e tsq_err = TBM_SURFACE_QUEUE_ERROR_NONE; tbm_surface_h tbm_surface = @@ -2257,10 +2255,19 @@ _twe_thread_wl_surf_source_destroy(void *source) surf_source->in_use_buffers = NULL; } - if (surf_source->committed_buffers) { - __tpl_list_free(surf_source->committed_buffers, - (tpl_free_func_t)__cb_buffer_remove_from_list); - surf_source->committed_buffers = NULL; + while (!__tpl_list_is_empty(surf_source->committed_buffers)) { + tbm_surface_queue_error_e tsq_err = TBM_SURFACE_QUEUE_ERROR_NONE; + tbm_surface_h tbm_surface = + __tpl_list_pop_front(surf_source->committed_buffers, + (tpl_free_func_t)__cb_buffer_remove_from_list); + + TRACE_ASYNC_END((int)tbm_surface, "[COMMIT ~ RELEASE] BO(%d)", + tbm_bo_export(tbm_surface_internal_get_bo( + tbm_surface, 0))); + tsq_err = tbm_surface_queue_release(surf_source->tbm_queue, tbm_surface); + if (tsq_err != TBM_SURFACE_QUEUE_ERROR_NONE) + TPL_ERR("Failed to release. tbm_surface(%p) tsq_err(%d)", + tbm_surface, tsq_err); } if (surf_source->vblank_waiting_buffers) {