mirror of
https://github.com/swaywm/sway.git
synced 2024-11-28 02:41:28 +00:00
output: Use scene_descriptor_find to compute max_render_time
This commit is contained in:
parent
1a9b3ce0d0
commit
93961e988b
|
@ -151,20 +151,9 @@ static void send_frame_done_iterator(struct wlr_scene_buffer *buffer,
|
|||
return;
|
||||
}
|
||||
|
||||
struct wlr_scene_node *current = &buffer->node;
|
||||
while (true) {
|
||||
struct sway_view *view = scene_descriptor_try_get(current,
|
||||
SWAY_SCENE_DESC_VIEW);
|
||||
struct sway_view *view = scene_descriptor_find(&buffer->node, SWAY_SCENE_DESC_VIEW);
|
||||
if (view) {
|
||||
view_max_render_time = view->max_render_time;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!current->parent) {
|
||||
break;
|
||||
}
|
||||
|
||||
current = ¤t->parent->node;
|
||||
}
|
||||
|
||||
int delay = data->msec_until_refresh - output->max_render_time
|
||||
|
|
Loading…
Reference in a new issue