Update GENIVI Audio Manager to 7.4 for CES2017 demo.
[AGL/meta-agl.git] / meta-agl-bsp / meta-ti / recipes-arago / weston / weston / 0003-ivi-shell-avoid-update_prop-on-invisible-surfaces.patch
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
5
6 For multi screen support, ivi_layout_screen to be taken account into
7 property change in commitChanges.
8
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.
12
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
18 weston_views.
19
20 Signed-off-by: Nobuhiko Tanibata <nobuhiko_tanibata@xddp.denso.co.jp>
21 Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
22 ---
23  ivi-shell/ivi-layout.c | 23 +++++++++++++++++++----
24  1 file changed, 19 insertions(+), 4 deletions(-)
25
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(
31  }
32  
33  static void
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)
38  {
39         struct weston_view *tmpview;
40         struct ivi_rectangle r;
41         bool can_calc = true;
42  
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)
46                 return;
47 -       }
48  
49         update_opacity(ivilayer, ivisurf);
50  
51 @@ -828,8 +829,22 @@ commit_changes(struct ivi_layout *layout)
52  
53         wl_list_for_each(iviscrn, &layout->screen_list, link) {
54                 wl_list_for_each(ivilayer, &iviscrn->order.layer_list, order.link) {
55 +                       /*
56 +                        * If ivilayer is invisible, weston_view of ivisurf doesn't
57 +                        * need to be modified.
58 +                        */
59 +                       if (ivilayer->prop.visibility == false)
60 +                               continue;
61 +
62                         wl_list_for_each(ivisurf, &ivilayer->order.surface_list, order.link) {
63 -                               update_prop(ivilayer, ivisurf);
64 +                               /*
65 +                                * If ivilayer is invisible, weston_view of ivisurf doesn't
66 +                                * need to be modified.
67 +                                */
68 +                               if (ivisurf->prop.visibility == false)
69 +                                       continue;
70 +
71 +                               update_prop(iviscrn, ivilayer, ivisurf);
72                         }
73                 }
74         }
75 -- 
76 2.4.5
77