mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-07 03:48:02 +02:00
compositor: Dump some paint node info with the scene graph
For now I've just added plane failure reasons, but more could follow. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
37c94a12d9
commit
628e860ffa
1 changed files with 26 additions and 8 deletions
|
|
@ -8915,6 +8915,29 @@ weston_plane_failure_reasons_to_str(enum try_view_on_plane_failure_reasons failu
|
|||
return "???";
|
||||
}
|
||||
|
||||
static void
|
||||
debug_scene_view_print_paint_node(FILE *fp,
|
||||
struct weston_view *view,
|
||||
struct weston_output *output)
|
||||
{
|
||||
struct weston_paint_node *pnode;
|
||||
|
||||
pnode = weston_view_find_paint_node(view, output);
|
||||
fprintf(fp, "\t\t\tpaint node %p:\n", pnode);
|
||||
|
||||
fprintf(fp, "\t\t\t\toutput: %d (%s)%s\n",
|
||||
output->id, output->name,
|
||||
(view->output == output) ? " (primary)" : "");
|
||||
|
||||
if (pnode->try_view_on_plane_failure_reasons) {
|
||||
char *fr_str = bits_to_str(pnode->try_view_on_plane_failure_reasons,
|
||||
weston_plane_failure_reasons_to_str);
|
||||
fprintf(fp, "\t\t\t\tPlane failure reasons: %s\n", fr_str);
|
||||
|
||||
free(fr_str);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
debug_scene_view_print(FILE *fp, struct weston_view *view, int view_idx)
|
||||
{
|
||||
|
|
@ -8969,19 +8992,14 @@ debug_scene_view_print(FILE *fp, struct weston_view *view, int view_idx)
|
|||
fprintf(fp, "\t\talpha: %f\n", view->alpha);
|
||||
|
||||
if (view->output_mask != 0) {
|
||||
bool first_output = true;
|
||||
fprintf(fp, "\t\toutputs: ");
|
||||
fprintf(fp, "\t\tpaint nodes:\n");
|
||||
wl_list_for_each(output, &ec->output_list, link) {
|
||||
if (!(view->output_mask & (1 << output->id)))
|
||||
continue;
|
||||
fprintf(fp, "%s%d (%s)%s",
|
||||
(first_output) ? "" : ", ",
|
||||
output->id, output->name,
|
||||
(view->output == output) ? " (primary)" : "");
|
||||
first_output = false;
|
||||
debug_scene_view_print_paint_node(fp, view, output);
|
||||
}
|
||||
} else {
|
||||
fprintf(fp, "\t\t[no outputs]");
|
||||
fprintf(fp, "\t\t[no paint nodes]");
|
||||
}
|
||||
|
||||
fprintf(fp, "\n");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue