mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-03-24 00:50:40 +01:00
libweston: give paint nodes internal_name and use it
Makes it much easier for humans to track paint nodes through debug logs. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
parent
62d1516fc2
commit
42cf94143c
2 changed files with 6 additions and 1 deletions
|
|
@ -418,6 +418,8 @@ weston_paint_node_create(struct weston_surface *surface,
|
|||
pnode->output = output;
|
||||
wl_list_insert(&output->paint_node_list, &pnode->output_link);
|
||||
|
||||
str_printf(&pnode->internal_name, "%u:%s", output->id, view->internal_name);
|
||||
|
||||
wl_list_init(&pnode->z_order_link);
|
||||
|
||||
pixman_region32_init(&pnode->damage);
|
||||
|
|
@ -484,6 +486,7 @@ weston_paint_node_destroy(struct weston_paint_node *pnode)
|
|||
pixman_region32_fini(&pnode->visible);
|
||||
pixman_region32_fini(&pnode->visible_previous);
|
||||
pixman_region32_fini(&pnode->clipped_view);
|
||||
free(pnode->internal_name);
|
||||
free(pnode);
|
||||
}
|
||||
|
||||
|
|
@ -9602,7 +9605,7 @@ debug_scene_view_print_paint_node(FILE *fp,
|
|||
if (!pnode)
|
||||
fprintf(fp, "\t\t\tpaint node [pending repaint]:\n");
|
||||
else
|
||||
fprintf(fp, "\t\t\tpaint node %p:\n", pnode);
|
||||
fprintf(fp, "\t\t\tpaint node %s:\n", pnode->internal_name);
|
||||
|
||||
fprintf(fp, "\t\t\t\toutput: %d (%s)%s\n",
|
||||
output->id, output->name,
|
||||
|
|
|
|||
|
|
@ -701,6 +701,8 @@ struct weston_paint_node {
|
|||
struct wl_list output_link;
|
||||
struct weston_output *output;
|
||||
|
||||
char *internal_name;
|
||||
|
||||
/* Mutable members: */
|
||||
|
||||
enum weston_paint_node_status status;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue