1 From 679cc873528ffb3fd94306a01dcf9d6ffa8eb120 Mon Sep 17 00:00:00 2001
2 From: Nobuhiko Tanibata <nobuhiko_tanibata@xddp.denso.co.jp>
3 Date: Wed, 9 Dec 2015 15:36:58 +0900
4 Subject: [PATCH 3/7] ivi-shell: avoid update_prop() on invisible surfaces
6 For multi screen support, ivi_layout_screen to be taken account into
7 property change in commitChanges.
9 Property change is now done in update_prop so to consider ivi_screen
10 property for caluculating transform of weston surface, ivi_layout_screen
11 is added as a parameter of update_prop.
13 However, update_prop of weston_view of a ivi_surface can not be done
14 even if it is set on a screen. The propoerty change shall be done only
15 when a visibility of ivi_surface or ivi_layer which contains the
16 ivi_surface is ON. Such a condition shall be checked at commit_changes
17 as well to avoid calling update_prop, which actually updates
20 Signed-off-by: Nobuhiko Tanibata <nobuhiko_tanibata@xddp.denso.co.jp>
21 Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
23 ivi-shell/ivi-layout.c | 23 +++++++++++++++++++----
24 1 file changed, 19 insertions(+), 4 deletions(-)
26 diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
27 index c8ea270..9dbebb3 100644
28 --- a/ivi-shell/ivi-layout.c
29 +++ b/ivi-shell/ivi-layout.c
30 @@ -763,16 +763,17 @@ calc_surface_to_global_matrix_and_mask_to_weston_surface(
34 -update_prop(struct ivi_layout_layer *ivilayer,
35 +update_prop(struct ivi_layout_screen *iviscrn,
36 + struct ivi_layout_layer *ivilayer,
37 struct ivi_layout_surface *ivisurf)
39 struct weston_view *tmpview;
40 struct ivi_rectangle r;
43 - if (!ivilayer->event_mask && !ivisurf->event_mask) {
44 + /*In case of no prop change, this just returns*/
45 + if (!ivilayer->event_mask && !ivisurf->event_mask)
49 update_opacity(ivilayer, ivisurf);
51 @@ -828,8 +829,22 @@ commit_changes(struct ivi_layout *layout)
53 wl_list_for_each(iviscrn, &layout->screen_list, link) {
54 wl_list_for_each(ivilayer, &iviscrn->order.layer_list, order.link) {
56 + * If ivilayer is invisible, weston_view of ivisurf doesn't
57 + * need to be modified.
59 + if (ivilayer->prop.visibility == false)
62 wl_list_for_each(ivisurf, &ivilayer->order.surface_list, order.link) {
63 - update_prop(ivilayer, ivisurf);
65 + * If ivilayer is invisible, weston_view of ivisurf doesn't
66 + * need to be modified.
68 + if (ivisurf->prop.visibility == false)
71 + update_prop(iviscrn, ivilayer, ivisurf);