From: Doyoun Kang Date: Wed, 4 Nov 2020 11:51:24 +0000 (+0900) Subject: Revert "subsurface: Remove some unnecessary internal API for sub-surface." X-Git-Tag: submit/tizen/20201105.050753~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F42%2F246842%2F1;p=platform%2Fupstream%2Fenlightenment.git Revert "subsurface: Remove some unnecessary internal API for sub-surface." This reverts commit f8193c22fa299e2eacdca44fe660545ceaa67c47. Change-Id: Id45c14e22c74276ee1a0cc3461d8dedb4413b751 --- diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 0eb939e26b..fcd2c9411c 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -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)) { diff --git a/src/bin/e_comp_wl_subsurface.c b/src/bin/e_comp_wl_subsurface.c index 307ba2e5ca..688cc551e7 100644 --- a/src/bin/e_comp_wl_subsurface.c +++ b/src/bin/e_comp_wl_subsurface.c @@ -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) { diff --git a/src/bin/e_comp_wl_subsurface.h b/src/bin/e_comp_wl_subsurface.h index 085144b3e1..d137c44408 100644 --- a/src/bin/e_comp_wl_subsurface.h +++ b/src/bin/e_comp_wl_subsurface.h @@ -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);