output: Use scene_descriptor_find to compute max_render_time

This commit is contained in:
Alexander Orzechowski 2024-08-26 15:31:17 -04:00
parent 1a9b3ce0d0
commit 93961e988b

View file

@ -151,20 +151,9 @@ static void send_frame_done_iterator(struct wlr_scene_buffer *buffer,
return; return;
} }
struct wlr_scene_node *current = &buffer->node; struct sway_view *view = scene_descriptor_find(&buffer->node, SWAY_SCENE_DESC_VIEW);
while (true) {
struct sway_view *view = scene_descriptor_try_get(current,
SWAY_SCENE_DESC_VIEW);
if (view) { if (view) {
view_max_render_time = view->max_render_time; view_max_render_time = view->max_render_time;
break;
}
if (!current->parent) {
break;
}
current = &current->parent->node;
} }
int delay = data->msec_until_refresh - output->max_render_time int delay = data->msec_until_refresh - output->max_render_time