tpl_wayland_egl: Set need_to_release flag to FALSE to skip release procedure. 47/183247/1
authorjoonbum.ko <joonbum.ko@samsung.com>
Tue, 26 Jun 2018 04:47:10 +0000 (13:47 +0900)
committerjoonbum.ko <joonbum.ko@samsung.com>
Tue, 26 Jun 2018 04:51:49 +0000 (13:51 +0900)
 - When flush_callback is called, the buffers in the attached_buffers list will be invalid,
  so they do not need to be handled by release_callback.

Change-Id: I7418cf4db8e3906c3088b859bfe806fca11101b6
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
src/tpl_wayland_egl.c

index d4d1ecd..cf5ddf9 100644 (file)
@@ -1677,9 +1677,14 @@ static void __cb_tizen_surface_shm_flusher_flush_callback(void *data,
                        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)