mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-18 05:48:12 +02:00
libweston: Don't add frame callbacks from occluded paint nodes
This changes the callback frame list insertion after paint node late update takes place in order for to the visibily region to be modified. Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
parent
e169b77430
commit
b2e6a6438f
1 changed files with 25 additions and 15 deletions
|
|
@ -3583,21 +3583,6 @@ weston_output_repaint(struct weston_output *output)
|
|||
}
|
||||
}
|
||||
|
||||
wl_list_init(&frame_callback_list);
|
||||
wl_list_for_each(pnode, &output->paint_node_z_order_list,
|
||||
z_order_link) {
|
||||
/* Note: This operation is safe to do multiple times on the
|
||||
* same surface.
|
||||
*/
|
||||
if (pnode->surface->output == output) {
|
||||
wl_list_insert_list(&frame_callback_list,
|
||||
&pnode->surface->frame_callback_list);
|
||||
wl_list_init(&pnode->surface->frame_callback_list);
|
||||
|
||||
weston_output_take_feedback_list(output, pnode->surface);
|
||||
}
|
||||
}
|
||||
|
||||
output_update_visibility(output);
|
||||
|
||||
wl_list_for_each(pnode, &output->paint_node_z_order_list,
|
||||
|
|
@ -3616,6 +3601,31 @@ weston_output_repaint(struct weston_output *output)
|
|||
|
||||
frame_time_msec = timespec_to_msec(&output->frame_time);
|
||||
|
||||
wl_list_init(&frame_callback_list);
|
||||
wl_list_for_each(pnode, &output->paint_node_z_order_list,
|
||||
z_order_link) {
|
||||
/* Note: This operation is safe to do multiple times on the
|
||||
* same surface.
|
||||
*/
|
||||
if (pnode->surface->output == output) {
|
||||
|
||||
/*
|
||||
* avoid adding pnode's frame callbacks/presented
|
||||
* feedback to the respective lists if pnode/surface is
|
||||
* occluded
|
||||
*/
|
||||
if (!pixman_region32_not_empty(&pnode->visible))
|
||||
continue;
|
||||
|
||||
wl_list_insert_list(&frame_callback_list,
|
||||
&pnode->surface->frame_callback_list);
|
||||
wl_list_init(&pnode->surface->frame_callback_list);
|
||||
|
||||
weston_output_take_feedback_list(output, pnode->surface);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
wl_resource_for_each_safe(cb, cnext, &frame_callback_list) {
|
||||
wl_callback_send_done(cb, frame_time_msec);
|
||||
wl_resource_destroy(cb);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue