Revert "e_policy: Flush buffer of e_client when client is unmap state" 62/322362/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Tue, 8 Apr 2025 03:11:42 +0000 (12:11 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Tue, 8 Apr 2025 04:22:24 +0000 (13:22 +0900)
This reverts commit 1cce42220436949a4f30d36715b5e63cee573959.

Change-Id: Ifa0a2f723e4fe90e204d3a4ecfda023e1a0e8da5

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 a46c44da1b18a85999f6b2bc299237acf8db9c5f..8f5f55415fc4a715cd51c43143ad99db3790ed05 100644 (file)
@@ -8241,21 +8241,6 @@ 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;
-}
-
 EINTERN Eina_Bool
 e_client_is_input_acceptable(E_Client *ec)
 {
index 23bb40e9a67b2f5d2142c4e556ea5a262e556d37..4a23f95c5bf8eb51ffd8602d1532f01c10b957d8 100644 (file)
@@ -259,8 +259,6 @@ 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);
-
 Eina_Bool e_client_is_input_acceptable(E_Client *ec);
 
 EINTERN void e_client_resize_edges_set(E_Client *ec, uint32_t edges);
index 3b8d156fd5939a40561c6676af249e5dd64be2a0..8d5d01e63bb39722c40fb5872bc75fa4bfab7f15 100644 (file)
@@ -2826,7 +2826,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 af6251221c2cde820b13120358676dc908d75d72..81f6087b3bb9c10d2fb4c03d046f011cb5494ad9 100644 (file)
@@ -1375,7 +1375,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);
@@ -1593,7 +1595,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);
@@ -1697,7 +1701,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 82caf44d2a23e22f80b56409c82a3261591e8b77..eeb7d8f37d1da765dad892ebf3462eb3a476b75c 100644 (file)
@@ -3341,8 +3341,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);
 
    buffer = e_surface_buffer_try_get(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 7fd419800c8b9a6c4f067813c79eb4e8555f287a..f1f9105063e7f097c58153692cdeb8f78ef2c730 100644 (file)
@@ -1987,7 +1987,8 @@ _e_policy_client_pixmap_buffer_clear(E_Policy_Client *policy_client, Eina_Bool o
    E_Tizen_Surface_Shm *surface_shm;
    E_Tizen_Surface_Shm_Flusher *surface_shm_flusher = NULL;
 
-   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;
 
    surface_shm = (E_Tizen_Surface_Shm *)e_server_feature_handle_get(E_SERVER_FEATURE_TIZEN_SURFACE_SHM);
    if (surface_shm)
index 26047417084c4c8de4ce8eac2764181a00044d05..7d51f9af1589e777f60eafae2a46a6cd3413f185 100644 (file)
@@ -1132,7 +1132,7 @@ _e_vis_client_cb_view_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);
 }