From 93961e988b51c5a9648ff0c53fe96532abc01443 Mon Sep 17 00:00:00 2001 From: Alexander Orzechowski Date: Mon, 26 Aug 2024 15:31:17 -0400 Subject: [PATCH] output: Use scene_descriptor_find to compute max_render_time --- sway/desktop/output.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/sway/desktop/output.c b/sway/desktop/output.c index a71430fe..ae49b649 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -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); - if (view) { - view_max_render_time = view->max_render_time; - break; - } - - if (!current->parent) { - break; - } - - current = ¤t->parent->node; + struct sway_view *view = scene_descriptor_find(&buffer->node, SWAY_SCENE_DESC_VIEW); + if (view) { + view_max_render_time = view->max_render_time; } int delay = data->msec_until_refresh - output->max_render_time