Revert "subsurface: Remove some unnecessary internal API for sub-surface." 42/246842/1
authorDoyoun Kang <doyoun.kang@samsung.com>
Wed, 4 Nov 2020 11:51:24 +0000 (20:51 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Wed, 4 Nov 2020 11:51:45 +0000 (20:51 +0900)
This reverts commit f8193c22fa299e2eacdca44fe660545ceaa67c47.

Change-Id: Id45c14e22c74276ee1a0cc3461d8dedb4413b751

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

index 0eb939e26b7e15bde218b2bcd0c5204b59178d4e..fcd2c9411c273e825bb54e5650c6d277f002a351 100644 (file)
@@ -4362,7 +4362,11 @@ e_comp_wl_surface_commit(E_Client *ec)
 
    ignored = ec->ignored;
 
-   e_comp_wl_subsurface_order_commit(ec);
+   if (e_comp_wl_subsurface_order_commit(ec))
+     {
+        e_comp_wl_subsurface_restack(ec);
+        e_comp_wl_subsurface_restack_bg_rectangle(ec);
+     }
 
    if (!e_pixmap_usable_get(ec->pixmap))
      {
index 307ba2e5ca751688c4e25b82097d5e59c77aac2e..688cc551e7188e59738781fb26fd8245c4b870c7 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_recursive(E_Client *ec)
+_e_comp_wl_subsurface_order_commit(E_Client *ec)
 {
    E_Client *subc;
    Eina_List *l;
@@ -344,7 +344,7 @@ _e_comp_wl_subsurface_order_commit_recursive(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_recursive(subc);
+        _e_comp_wl_subsurface_order_commit(subc);
      }
 
    EINA_LIST_FOREACH(ec->comp_data->sub.below_list_pending, l, subc)
@@ -352,25 +352,12 @@ _e_comp_wl_subsurface_order_commit_recursive(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_recursive(subc);
+        _e_comp_wl_subsurface_order_commit(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)
 {
@@ -474,7 +461,11 @@ _e_comp_wl_subsurface_commit_from_cache(E_Client *ec)
 
    e_comp_wl_buffer_reference(&sdata->cached_buffer_ref, NULL);
 
-   _e_comp_wl_subsurface_order_commit(ec);
+   if (_e_comp_wl_subsurface_order_commit(ec))
+     {
+        _e_comp_wl_subsurface_restack(ec);
+        _e_comp_wl_subsurface_restack_bg_rectangle(ec);
+     }
 
    sdata->cached.has_data = EINA_FALSE;
 }
@@ -1119,9 +1110,7 @@ e_comp_wl_subsurface_order_commit(E_Client *ec)
 {
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
 
-   _e_comp_wl_subsurface_order_commit(ec);
-
-   return EINA_FALSE;
+   return _e_comp_wl_subsurface_order_commit(ec);
 }
 
 EINTERN Eina_Bool
@@ -1219,6 +1208,22 @@ 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 085144b3e13c6a64a00d9ef7394df6f51e1ab1c7..d137c44408957dee73e80aba649fc5ef2af2b404 100644 (file)
@@ -19,6 +19,8 @@ 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);