Revert "e_policy: Flush buffer of e_client when client is unmap state" 58/321858/1
authorDoyoun Kang <doyoun.kang@samsung.com>
Mon, 31 Mar 2025 09:11:35 +0000 (18:11 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Mon, 31 Mar 2025 09:13:31 +0000 (18:13 +0900)
This reverts commit 0c61d73deba7dbccd1efeb78cb81c5bf10d1a267.

Change-Id: I3bb31460f905e6ce7b52e96dd183336b247deee8

src/bin/core/e_client.c
src/bin/core/e_client_intern.h
src/bin/displaymgr/e_hwc_window.c
src/bin/displaymgr/e_hwc_window_queue.c
src/bin/server/e_comp_wl.c
src/bin/windowmgr/e_policy.c
src/bin/windowmgr/e_policy_visibility.c

index d2a746d5a233add86a602ea1df8cd199aa026b08..7c80f731997589ca402e157bda13c22b1f361cbe 100644 (file)
@@ -8840,18 +8840,3 @@ e_client_subsurface_data_try_get(E_Client *ec)
 {
    return ec->comp_data ? ec->comp_data->sub.data : NULL;
 }
-
-EINTERN Eina_Bool
-e_client_buffer_flush_enabled_get(E_Client *ec)
-{
-   if (!ec) return EINA_FALSE;
-   if (!ec->comp_data) return EINA_FALSE;
-   if (!ec->exp_iconify.buffer_flush) return EINA_FALSE;
-   if (e_view_client_visible_get(e_client_view_get(ec))) return EINA_FALSE;
-   if (ec->is_cursor) return EINA_FALSE;
-
-   if (e_policy_visibility_client_is_iconic(ec)) return EINA_TRUE;
-   if (!ec->comp_data->mapped) return EINA_TRUE;
-
-   return EINA_FALSE;
-}
index 654520dad91cebe1c5d8463dbec7b1f2e5e50fa2..c5db9373d6971e1e89c23805cb61f2e8996c6140 100644 (file)
@@ -274,6 +274,4 @@ int       e_client_virtual_touch_finger_get(E_Client *ec);
 void      e_client_virtual_touch_threshold_set(E_Client *ec, int threshold);
 int       e_client_virtual_touch_threshold_get(E_Client *ec);
 
-EINTERN Eina_Bool e_client_buffer_flush_enabled_get(E_Client *ec);
-
 #endif
index f7b2bf16b309ffab197456e73dbf95ba54702a79..4da34ff3d7bc1bd9ad442a01b18447cf68cbb61a 100644 (file)
@@ -2741,7 +2741,9 @@ _e_hwc_window_client_recover(E_Hwc_Window *hwc_window, Eina_Bool *clear_attach)
    comp_wl_buffer = _e_hwc_window_comp_wl_buffer_get(hwc_window);
 
    if ((!comp_wl_buffer) &&
-       (e_client_buffer_flush_enabled_get(ec)))
+       (!e_view_client_visible_get(e_client_view_get(ec))) &&
+       (ec->exp_iconify.buffer_flush) &&
+       (e_policy_visibility_client_is_iconic(ec)))
     return EINA_FALSE;
 
    if (!comp_wl_buffer)
index f57784dde3e8309f69159fa8be0d62f48ee5cfff..a6cf7ee98e73110a7b65afa2a645f338810ae98a 100644 (file)
@@ -1374,7 +1374,9 @@ _e_hwc_window_queue_copy_thread_run_end_cb(void *data, Ecore_Thread *thread)
    if (!(ec = copy_thread_data->hwc_window->ec)) goto end;
    if (!e_client_cdata_get(ec)) goto end;
 
-   if (e_client_buffer_flush_enabled_get(ec))
+   if ((!e_view_client_visible_get(e_client_view_get(ec))) &&
+       (ec->exp_iconify.buffer_flush) &&
+       (e_policy_visibility_client_is_iconic(ec)))
      goto end;
 
    comp_buffer = _comp_wl_buffer_get(ec);
@@ -1592,7 +1594,9 @@ _e_hwc_window_queue_prepare_unset(E_Hwc_Window_Queue *queue)
 
    if (!hwc_window->ec) return;
 
-   if (e_client_buffer_flush_enabled_get(hwc_window->ec))
+   if ((!e_view_client_visible_get(e_client_view_get(hwc_window->ec))) &&
+       (hwc_window->ec->exp_iconify.buffer_flush) &&
+       (e_policy_visibility_client_is_iconic(hwc_window->ec)))
      return;
 
    _e_hwc_window_queue_copy_thread_check_and_run(hwc_window);
@@ -1696,7 +1700,9 @@ _e_hwc_window_queue_cb_buffer_change(void *data, E_Client *ec)
 
    hwc_window = ec->hwc_window;
    if (!hwc_window) return;
-   if (e_client_buffer_flush_enabled_get(hwc_window->ec))
+   if ((!e_view_client_visible_get(e_client_view_get(ec))) &&
+       (ec->exp_iconify.buffer_flush) &&
+       (e_policy_visibility_client_is_iconic(ec)))
      return;
 
    _e_hwc_window_queue_copy_thread_check_and_run(hwc_window);
index a566aeeefaa67001bc552c54558860adcc7baf54..ca5b2b9189d98ea45d251dc38709d207c6df7b09 100644 (file)
@@ -3237,8 +3237,12 @@ _e_comp_wl_surface_state_commit(E_Client *ec, E_Comp_Wl_Surface_State *state)
 
    wl_signal_emit(&cdata->state_commit_signal, &cdata->surface);
 
-   if ((buffer) && (e_client_buffer_flush_enabled_get(ec)))
-     e_pixmap_buffer_clear(ec->pixmap, EINA_FALSE);
+   if (buffer &&
+       ec->exp_iconify.buffer_flush &&
+       e_policy_visibility_client_is_iconic(ec))
+     {
+        e_pixmap_buffer_clear(ec->pixmap, EINA_FALSE);
+     }
 }
 
 static void
index 58f7b997299cdc56c4ca320103b778a5c63199fc..c9d17aae02232ca52982078bbd7afc35852f3b50 100644 (file)
@@ -2192,7 +2192,8 @@ _e_policy_client_pixmap_buffer_clear(E_Policy_Client *policy_client, Eina_Bool o
    E_Pixmap *pixmap = ec->pixmap;
    E_Surface *surface;
 
-   if ((!only_free) && (!e_client_buffer_flush_enabled_get(ec))) return;
+   /* if not only free, client should be iconic state */
+   if (!only_free && !e_policy_visibility_client_is_iconic(ec)) return;
 
    E_Tizen_Surface_Shm *surface_shm;
    E_Tizen_Surface_Shm_Flusher *surface_shm_flusher;
index 1dbe02262ea76a0a69edd18d0e1112165e28cbb1..64cac39334ff6d95ab37b4068792cd2f6ed4336a 100644 (file)
@@ -1124,7 +1124,7 @@ _e_vis_client_cb_hide(struct wl_listener *listener, void *data)
    VS_DBG(ec, "\tUPDATE ICONIC STATE: %s", STATE_STR(vc));
    vc->prepare_emitted = 0;
 
-   if (e_client_buffer_flush_enabled_get(ec))
+   if (ec->iconic && ec->exp_iconify.buffer_flush)
      e_pixmap_buffer_clear(ec->pixmap, EINA_FALSE);
 }