wl_egl: remove checking activated when dequeue buffer 26/295426/1
authorJoonbum Ko <joonbum.ko@samsung.com>
Thu, 15 Jun 2023 07:02:37 +0000 (16:02 +0900)
committerJoonbum Ko <joonbum.ko@samsung.com>
Thu, 6 Jul 2023 05:02:16 +0000 (14:02 +0900)
 - Actual buffer will be attached when calling tbm_surface_queue_can_dequeue().
  So calling wayland_tbm_client_queue_check_activate() at dequeue_buffer
  is not appropriate.

Change-Id: Ie5500aa50f396e4a76160c703932d6c805e93d3d
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
src/tpl_wl_egl_thread.c

index 7a57437..d305ec0 100755 (executable)
@@ -2541,7 +2541,6 @@ __tpl_wl_egl_surface_dequeue_buffer(tpl_surface_t *surface, uint64_t timeout_ns,
        tpl_wl_egl_buffer_t *wl_egl_buffer   = NULL;
 
        tbm_surface_queue_error_e tsq_err    = TBM_SURFACE_QUEUE_ERROR_NONE;
-       tpl_bool_t      is_activated         = 0;
        int             bo_name              = 0;
        tbm_surface_h   tbm_surface          = NULL;
 
@@ -2626,22 +2625,6 @@ __tpl_wl_egl_surface_dequeue_buffer(tpl_surface_t *surface, uint64_t timeout_ns,
         * during below dequeue procedure. */
        tpl_gmutex_lock(&wl_egl_display->wl_event_mutex);
 
-       /* wayland client can check their states (ACTIVATED or DEACTIVATED) with
-        * below function [wayland_tbm_client_queue_check_activate()].
-        * This function has to be called before tbm_surface_queue_dequeue()
-        * in order to know what state the buffer will be dequeued next.
-        *
-        * ACTIVATED state means non-composite mode. Client can get buffers which
-           can be displayed directly(without compositing).
-        * DEACTIVATED state means composite mode. Client's buffer will be displayed
-           by compositor(E20) with compositing.
-        */
-       is_activated = wayland_tbm_client_queue_check_activate(
-                                               wl_egl_display->wl_tbm_client,
-                                               wl_egl_surface->tbm_queue);
-
-       wl_egl_surface->is_activated = is_activated;
-
        surface->width = tbm_surface_queue_get_width(wl_egl_surface->tbm_queue);
        surface->height = tbm_surface_queue_get_height(wl_egl_surface->tbm_queue);
        wl_egl_surface->width = surface->width;
@@ -2664,7 +2647,7 @@ __tpl_wl_egl_surface_dequeue_buffer(tpl_surface_t *surface, uint64_t timeout_ns,
         * */
        if (surface->frontbuffer) {
                if (!surface->is_frontbuffer_mode ||
-                       !is_activated ||
+                       !wl_egl_surface->is_activated ||
                        wl_egl_surface->reset) {
                        surface->frontbuffer = NULL;
                        wl_egl_surface->need_to_enqueue = TPL_TRUE;
@@ -2721,7 +2704,7 @@ __tpl_wl_egl_surface_dequeue_buffer(tpl_surface_t *surface, uint64_t timeout_ns,
                }
        }
 
-       if (surface->is_frontbuffer_mode && is_activated) {
+       if (surface->is_frontbuffer_mode && wl_egl_surface->is_activated) {
                if (surface->frontbuffer == NULL) {
                        TPL_INFO("[FRONTBUFFER RENDERING START]",
                                         "wl_egl_surface(%p) wl_egl_window(%p) bo(%d)",