diff options
author | Nobuhiko Tanibata <nobuhiko_tanibata@xddp.denso.co.jp> | 2015-12-09 15:36:58 +0900 |
---|---|---|
committer | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2015-12-14 13:16:11 +0200 |
commit | b4cb25dc261375bad87d1c1dd058b9716009e6fb (patch) | |
tree | 7849037aafc34d76729bc8d756c2392b33baf046 /ivi-shell | |
parent | 0627b4a73d323fb65ce7271c5db35fd211f11551 (diff) |
ivi-shell: avoid update_prop() on invisible surfaces
For multi screen support, ivi_layout_screen to be taken account into
property change in commitChanges.
Property change is now done in update_prop so to consider ivi_screen
property for caluculating transform of weston surface, ivi_layout_screen
is added as a parameter of update_prop.
However, update_prop of weston_view of a ivi_surface can not be done
even if it is set on a screen. The propoerty change shall be done only
when a visibility of ivi_surface or ivi_layer which contains the
ivi_surface is ON. Such a condition shall be checked at commit_changes
as well to avoid calling update_prop, which actually updates
weston_views.
Signed-off-by: Nobuhiko Tanibata <nobuhiko_tanibata@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Diffstat (limited to 'ivi-shell')
-rw-r--r-- | ivi-shell/ivi-layout.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c index 04fee7a3..724ca6fe 100644 --- a/ivi-shell/ivi-layout.c +++ b/ivi-shell/ivi-layout.c @@ -590,16 +590,17 @@ calc_surface_to_global_matrix_and_mask_to_weston_surface( } static void -update_prop(struct ivi_layout_layer *ivilayer, +update_prop(struct ivi_layout_screen *iviscrn, + struct ivi_layout_layer *ivilayer, struct ivi_layout_surface *ivisurf) { struct weston_view *tmpview; struct ivi_rectangle r; bool can_calc = true; - if (!ivilayer->event_mask && !ivisurf->event_mask) { + /*In case of no prop change, this just returns*/ + if (!ivilayer->event_mask && !ivisurf->event_mask) return; - } update_opacity(ivilayer, ivisurf); @@ -646,8 +647,22 @@ commit_changes(struct ivi_layout *layout) wl_list_for_each(iviscrn, &layout->screen_list, link) { wl_list_for_each(ivilayer, &iviscrn->order.layer_list, order.link) { + /* + * If ivilayer is invisible, weston_view of ivisurf doesn't + * need to be modified. + */ + if (ivilayer->prop.visibility == false) + continue; + wl_list_for_each(ivisurf, &ivilayer->order.surface_list, order.link) { - update_prop(ivilayer, ivisurf); + /* + * If ivilayer is invisible, weston_view of ivisurf doesn't + * need to be modified. + */ + if (ivisurf->prop.visibility == false) + continue; + + update_prop(iviscrn, ivilayer, ivisurf); } } } |