summaryrefslogtreecommitdiff
path: root/ivi-shell/ivi-layout.c
diff options
context:
space:
mode:
authorEmre Ucan <eucan@de.adit-jv.com>2018-10-26 14:42:21 +0200
committerEmre Ucan <eucan@de.adit-jv.com>2018-11-02 11:28:32 +0100
commitd93a52a6f9c8efd5345ef36c3a82ae76f6889c90 (patch)
treea13459dba79748ee25b8cc923d1380893d49b56c /ivi-shell/ivi-layout.c
parentf6638a7f0f8e8bdaa87a74a724542e91d303fce0 (diff)
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 <eucan@de.adit-jv.com>
Diffstat (limited to 'ivi-shell/ivi-layout.c')
-rw-r--r--ivi-shell/ivi-layout.c27
1 files changed, 1 insertions, 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);
}