compositor: Improve timing information in scene graph dump

After moving the drm-backend's scene graph dump, it now always occurs when
repaint_status is REPAINT_AWAITING_COMPLETION, which loses useful timing
information we used to have.

Add timing information for the REPAINT_AWAITING_COMPLETION state, and also
add the expected presentation time.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
Derek Foreman 2025-10-07 13:49:31 -05:00
parent eb61323aa1
commit 2bbe222883

View file

@ -9560,11 +9560,21 @@ weston_compositor_print_scene_graph(struct weston_compositor *ec)
fprintf(fp, "\trepaint status: %s\n", fprintf(fp, "\trepaint status: %s\n",
output_repaint_status_text(output)); output_repaint_status_text(output));
if (output->repaint_status == REPAINT_SCHEDULED) if (output->repaint_status == REPAINT_SCHEDULED) {
fprintf(fp, "\tnext repaint: %" PRId64 ".%09ld\n", fprintf(fp, "\tnext repaint scheduled for: %" PRId64 ".%09ld\n",
(int64_t)output->next_repaint.tv_sec, (int64_t)output->next_repaint.tv_sec,
output->next_repaint.tv_nsec); output->next_repaint.tv_nsec);
fprintf(fp, "\tto be presented at: %" PRId64 ".%09ld\n",
(int64_t)output->next_present.tv_sec,
output->next_present.tv_nsec);
} else if (output->repaint_status == REPAINT_AWAITING_COMPLETION) {
fprintf(fp, "\twaiting for repaint that occurred at: %" PRId64 ".%09ld\n",
(int64_t)output->next_repaint.tv_sec,
output->next_repaint.tv_nsec);
fprintf(fp, "\tto be presented at: %" PRId64 ".%09ld\n",
(int64_t)output->next_present.tv_sec,
output->next_present.tv_nsec);
}
wl_list_for_each(head, &output->head_list, output_link) { wl_list_for_each(head, &output->head_list, output_link) {
fprintf(fp, "\tHead %d (%s): %sconnected\n", fprintf(fp, "\tHead %d (%s): %sconnected\n",
head_idx++, head->name, head_idx++, head->name,