libweston,backends: assert if z_order_list contains pnodes for wrong output
We've just made this impossible, so we can now clean up all the TODO locations. I've only turned some of them into assert()s, because they're all mostly in the same place. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
85e3a4723b
commit
a9986ef984
@ -767,14 +767,7 @@ drm_output_propose_state(struct weston_output *output_base,
|
||||
ev, output->base.name,
|
||||
(unsigned long) output->base.id);
|
||||
|
||||
/* If this view doesn't touch our output at all, there's no
|
||||
* reason to do anything with it. */
|
||||
/* TODO: turn this into assert once z_order_list is pruned. */
|
||||
if (!(ev->output_mask & (1u << output->base.id))) {
|
||||
drm_debug(b, "\t\t\t\t[view] ignoring view %p "
|
||||
"(not on our output)\n", ev);
|
||||
continue;
|
||||
}
|
||||
assert(ev->output_mask & (1u << output->base.id));
|
||||
|
||||
/* Cannot show anything without a color transform. */
|
||||
if (!pnode->surf_xform_valid) {
|
||||
@ -1022,11 +1015,7 @@ drm_assign_planes(struct weston_output *output_base)
|
||||
struct weston_view *ev = pnode->view;
|
||||
struct drm_plane *target_plane = NULL;
|
||||
|
||||
/* If this view doesn't touch our output at all, there's no
|
||||
* reason to do anything with it. */
|
||||
/* TODO: turn this into assert once z_order_list is pruned. */
|
||||
if (!(ev->output_mask & (1u << output->base.id)))
|
||||
continue;
|
||||
assert(ev->output_mask & (1u << output->base.id));
|
||||
|
||||
/* Update dmabuf-feedback if needed */
|
||||
if (ev->surface->dmabuf_feedback)
|
||||
|
@ -1049,11 +1049,7 @@ vnc_output_assign_planes(struct weston_output *base)
|
||||
struct weston_view *view = pnode->view;
|
||||
struct nvnc_fb *fb = NULL;
|
||||
|
||||
/* If this view doesn't touch our output at all, there's no
|
||||
* reason to do anything with it. */
|
||||
/* TODO: turn this into assert once z_order_list is pruned. */
|
||||
if (!(view->output_mask & (1u << output->base.id)))
|
||||
continue;
|
||||
assert(view->output_mask & (1u << output->base.id));
|
||||
|
||||
/* Skip cursor view */
|
||||
if (view->plane == &output->cursor_plane)
|
||||
|
@ -2976,10 +2976,6 @@ output_accumulate_damage(struct weston_output *output)
|
||||
|
||||
wl_list_for_each(pnode, &output->paint_node_z_order_list,
|
||||
z_order_link) {
|
||||
/* Ignore views not visible on the current output */
|
||||
/* TODO: turn this into assert once z_order_list is pruned. */
|
||||
if (!(pnode->view->output_mask & (1u << output->id)))
|
||||
continue;
|
||||
if (pnode->surface->touched)
|
||||
continue;
|
||||
pnode->surface->touched = true;
|
||||
@ -3211,13 +3207,15 @@ weston_output_repaint(struct weston_output *output)
|
||||
if (ec->view_list_needs_rebuild)
|
||||
weston_compositor_build_view_list(ec);
|
||||
|
||||
wl_list_for_each(pnode, &output->paint_node_z_order_list,
|
||||
z_order_link) {
|
||||
assert(pnode->view->output_mask & (1u << pnode->output->id));
|
||||
assert(pnode->output == output);
|
||||
}
|
||||
|
||||
/* Find the highest protection desired for an output */
|
||||
wl_list_for_each(pnode, &output->paint_node_z_order_list,
|
||||
z_order_link) {
|
||||
/* TODO: turn this into assert once z_order_list is pruned. */
|
||||
if ((pnode->surface->output_mask & (1u << output->id)) == 0)
|
||||
continue;
|
||||
|
||||
/*
|
||||
* The desired_protection of the output should be the
|
||||
* maximum of the desired_protection of the surfaces,
|
||||
@ -3235,10 +3233,6 @@ weston_output_repaint(struct weston_output *output)
|
||||
} else {
|
||||
wl_list_for_each(pnode, &output->paint_node_z_order_list,
|
||||
z_order_link) {
|
||||
/* TODO: turn this into assert once z_order_list is pruned. */
|
||||
if ((pnode->view->output_mask & (1u << output->id)) == 0)
|
||||
continue;
|
||||
|
||||
weston_view_move_to_plane(pnode->view, &ec->primary_plane);
|
||||
pnode->view->psf_flags = 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user