libweston: Skip views without a layer assignment in output_mask calculations
Surface views that are not assigned to a layer are not going to be rendered, and thus should not participate in determining the outputs the surface is on. There are other view properties that may determine if the view should be considered in output_mask calculations, e.g., is_mapped, but checking for this currently breaks tests. Such additional checks are left for future fixes or reworkings of the view infrastructure. Fixes #646 Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
This commit is contained in:
parent
b87418e4c4
commit
0669d4de4f
|
@ -1300,6 +1300,14 @@ weston_view_set_output(struct weston_view *view, struct weston_output *output)
|
|||
}
|
||||
}
|
||||
|
||||
static struct weston_layer *
|
||||
get_view_layer(struct weston_view *view)
|
||||
{
|
||||
if (view->parent_view)
|
||||
return get_view_layer(view->parent_view);
|
||||
return view->layer_link.layer;
|
||||
}
|
||||
|
||||
/** Recalculate which output(s) the surface has views displayed on
|
||||
*
|
||||
* \param es The surface to remap to outputs
|
||||
|
@ -1325,7 +1333,9 @@ weston_surface_assign_output(struct weston_surface *es)
|
|||
mask = 0;
|
||||
pixman_region32_init(®ion);
|
||||
wl_list_for_each(view, &es->views, surface_link) {
|
||||
if (!view->output)
|
||||
/* Only views that are visible on some layer participate in
|
||||
* output_mask calculations. */
|
||||
if (!view->output || !get_view_layer(view))
|
||||
continue;
|
||||
|
||||
pixman_region32_intersect(®ion, &view->transform.boundingbox,
|
||||
|
@ -1605,14 +1615,6 @@ weston_view_update_transform_enable(struct weston_view *view)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static struct weston_layer *
|
||||
get_view_layer(struct weston_view *view)
|
||||
{
|
||||
if (view->parent_view)
|
||||
return get_view_layer(view->parent_view);
|
||||
return view->layer_link.layer;
|
||||
}
|
||||
|
||||
WL_EXPORT void
|
||||
weston_view_update_transform(struct weston_view *view)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue