subsurface: Remove some unnecessary internal API for sub-surface. 63/246163/3
authorSeunghun Lee <shiin.lee@samsung.com>
Thu, 22 Oct 2020 09:01:47 +0000 (18:01 +0900)
committerSeunghun Lee <shiin.lee@samsung.com>
Tue, 27 Oct 2020 02:32:58 +0000 (11:32 +0900)
If stacking order of sub-surfaces changes, there is no choice but to
update stacking order of composite objects associated with sub-surfaces.
So stacking order of composite objects can be updated when order is
applied. By doing this, internal API for re-stacking composite objects
and below_obj can be removed.

Change-Id: I26a305078ad2fd708e7dcba0ef154077a7829876

src/bin/e_comp_wl.c
src/bin/e_comp_wl_subsurface.c
src/bin/e_comp_wl_subsurface.h

index e04d06c8802537c4aeed753ff2b31d00757190ac..c9e5a295713e716435ec1ff0cf2596e840bb88b0 100644 (file)
@@ -4355,11 +4355,7 @@ e_comp_wl_surface_commit(E_Client *ec)
 
    ignored = ec->ignored;
 
-   if (e_comp_wl_subsurface_order_commit(ec))
-     {
-        e_comp_wl_subsurface_restack(ec);
-        e_comp_wl_subsurface_restack_bg_rectangle(ec);
-     }
+   e_comp_wl_subsurface_order_commit(ec);
 
    if (!e_pixmap_usable_get(ec->pixmap))
      {
index 688cc551e7188e59738781fb26fd8245c4b870c7..307ba2e5ca751688c4e25b82097d5e59c77aac2e 100644 (file)
@@ -326,7 +326,7 @@ _e_comp_wl_subsurface_invisible_parent_get(E_Client *ec)
 }
 
 static Eina_Bool
-_e_comp_wl_subsurface_order_commit(E_Client *ec)
+_e_comp_wl_subsurface_order_commit_recursive(E_Client *ec)
 {
    E_Client *subc;
    Eina_List *l;
@@ -344,7 +344,7 @@ _e_comp_wl_subsurface_order_commit(E_Client *ec)
         ec->comp_data->sub.list = eina_list_remove(ec->comp_data->sub.list, subc);
         ec->comp_data->sub.list = eina_list_append(ec->comp_data->sub.list, subc);
 
-        _e_comp_wl_subsurface_order_commit(subc);
+        _e_comp_wl_subsurface_order_commit_recursive(subc);
      }
 
    EINA_LIST_FOREACH(ec->comp_data->sub.below_list_pending, l, subc)
@@ -352,12 +352,25 @@ _e_comp_wl_subsurface_order_commit(E_Client *ec)
         ec->comp_data->sub.below_list = eina_list_remove(ec->comp_data->sub.below_list, subc);
         ec->comp_data->sub.below_list = eina_list_append(ec->comp_data->sub.below_list, subc);
 
-        _e_comp_wl_subsurface_order_commit(subc);
+        _e_comp_wl_subsurface_order_commit_recursive(subc);
      }
 
    return EINA_TRUE;
 }
 
+static void
+_e_comp_wl_subsurface_order_commit(E_Client *ec)
+{
+   Eina_Bool res;
+
+   res = _e_comp_wl_subsurface_order_commit_recursive(ec);
+   if (res)
+     {
+        _e_comp_wl_subsurface_restack(ec);
+        _e_comp_wl_subsurface_restack_bg_rectangle(ec);
+     }
+}
+
 static void
 _e_comp_wl_subsurface_commit_to_cache(E_Client *ec)
 {
@@ -461,11 +474,7 @@ _e_comp_wl_subsurface_commit_from_cache(E_Client *ec)
 
    e_comp_wl_buffer_reference(&sdata->cached_buffer_ref, NULL);
 
-   if (_e_comp_wl_subsurface_order_commit(ec))
-     {
-        _e_comp_wl_subsurface_restack(ec);
-        _e_comp_wl_subsurface_restack_bg_rectangle(ec);
-     }
+   _e_comp_wl_subsurface_order_commit(ec);
 
    sdata->cached.has_data = EINA_FALSE;
 }
@@ -1110,7 +1119,9 @@ e_comp_wl_subsurface_order_commit(E_Client *ec)
 {
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
 
-   return _e_comp_wl_subsurface_order_commit(ec);
+   _e_comp_wl_subsurface_order_commit(ec);
+
+   return EINA_FALSE;
 }
 
 EINTERN Eina_Bool
@@ -1208,22 +1219,6 @@ e_comp_wl_subsurface_hide(E_Client *ec)
    _e_comp_wl_subsurface_hide(ec);
 }
 
-EINTERN void
-e_comp_wl_subsurface_restack_bg_rectangle(E_Client *ec)
-{
-   EINA_SAFETY_ON_NULL_RETURN(ec);
-
-   _e_comp_wl_subsurface_restack_bg_rectangle(ec);
-}
-
-EINTERN void
-e_comp_wl_subsurface_restack(E_Client *ec)
-{
-   EINA_SAFETY_ON_NULL_RETURN(ec);
-
-   _e_comp_wl_subsurface_restack(ec);
-}
-
 E_API void
 e_comp_wl_subsurface_stack_update(E_Client *ec)
 {
index d137c44408957dee73e80aba649fc5ef2af2b404..085144b3e13c6a64a00d9ef7394df6f51e1ab1c7 100644 (file)
@@ -19,8 +19,6 @@ EINTERN Eina_Bool     e_comp_wl_subsurface_commit(E_Client *ec);
 EINTERN Eina_Bool     e_comp_wl_subsurface_can_show(E_Client *ec);
 EINTERN void          e_comp_wl_subsurface_show(E_Client *ec);
 EINTERN void          e_comp_wl_subsurface_hide(E_Client *ec);
-EINTERN void          e_comp_wl_subsurface_restack_bg_rectangle(E_Client *ec);
-EINTERN void          e_comp_wl_subsurface_restack(E_Client *ec);
 EINTERN Eina_Bool     e_comp_wl_video_subsurface_has(E_Client *ec);
 EINTERN Eina_Bool     e_comp_wl_normal_subsurface_has(E_Client *ec);
 EINTERN void          e_comp_wl_subsurface_check_below_bg_rectangle(E_Client *ec);