From d93a52a6f9c8efd5345ef36c3a82ae76f6889c90 Mon Sep 17 00:00:00 2001 From: Emre Ucan Date: Fri, 26 Oct 2018 14:42:21 +0200 Subject: [PATCH] ivi-shell: check ivi_view mappedness in commit_changes() If the view is not mapped, we do not need to update its properties. We can use ivi_view_is_mapped() function to check it. Also we don't need to call weston_view_damage_below() for weston_views, which were in the scenegraph. Because we are calling weston_view_unmap for views of unmapped ivi_views in build_view_list() function Signed-off-by: Emre Ucan --- ivi-shell/ivi-layout.c | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c index d1e53df6..b9bcfc80 100644 --- a/ivi-shell/ivi-layout.c +++ b/ivi-shell/ivi-layout.c @@ -598,40 +598,15 @@ ivi_view_is_mapped(struct ivi_layout_view *ivi_view) static void commit_changes(struct ivi_layout *layout) { - struct ivi_layout_screen *iviscrn = NULL; - struct ivi_layout_layer *ivilayer = NULL; - struct ivi_layout_surface *ivisurf = NULL; struct ivi_layout_view *ivi_view = NULL; wl_list_for_each(ivi_view, &layout->view_list, link) { - ivisurf = ivi_view->ivisurf; - ivilayer = ivi_view->on_layer; - iviscrn = ivilayer->on_screen; - /* * If the view is not on the currently rendered scenegraph, * we do not need to update its properties. */ - if (wl_list_empty(&ivi_view->order_link) || !iviscrn) - continue; - - /* - * If the view's layer or surface is invisible, we do not need - * to update its properties. - */ - if (!ivilayer->prop.visibility || !ivisurf->prop.visibility) { - /* - * If ivilayer or ivisurf of ivi_view is made invisible - * in this commit_changes call, we have to damage - * the weston_view below this ivi_view. Otherwise content - * of this ivi_view will stay visible. - */ - if ((ivilayer->prop.event_mask | ivisurf->prop.event_mask) & - IVI_NOTIFICATION_VISIBILITY) - weston_view_damage_below(ivi_view->view); - + if (!ivi_view_is_mapped(ivi_view)) continue; - } update_prop(ivi_view); }