tbm_surface_queue_error_e tsq_err;
tbm_surface_h tbm_surface =
__tpl_list_pop_front(wayland_egl_surface->attached_buffers, NULL);
- TRACE_ASYNC_END((int)tbm_surface, "[COMMIT ~ RELEASE_CB] BO_NAME:%d",
- tbm_bo_export(tbm_surface_internal_get_bo(
- tbm_surface, 0)));
+ tpl_wayland_egl_buffer_t *wayland_egl_buffer =
+ __tpl_wayland_egl_get_wayland_buffer_from_tbm_surface(tbm_surface);
+ if (wayland_egl_buffer) {
+ /* This buffer does not need to processed at release_callback.
+ * It will be invalid buffer */
+ wayland_egl_buffer->need_to_release = TPL_FALSE;
+ }
+
tbm_surface_internal_unref(tbm_surface);
tsq_err = tbm_surface_queue_release(wayland_egl_surface->tbm_queue, tbm_surface);
if (tsq_err != TBM_SURFACE_QUEUE_ERROR_NONE)