scene-graph: Print when surface/view is not mapped

A view shouldn't be mapped if a surface isn't mapped, and it shouldn't
be in the scene graph if it isn't mapped either. Print when this happens
so you can see more from the debug.

Signed-off-by: Daniel Stone <daniels@collabora.com>
dev
Daniel Stone 2 years ago committed by Pekka Paalanen
parent 10403a85ec
commit 0774a321c5
  1. 5
      libweston/compositor.c

@ -7940,6 +7940,11 @@ debug_scene_view_print(FILE *fp, struct weston_view *view, int view_idx)
view_idx, view->surface->role_name, pid, surface_id,
desc, view);
if (!weston_view_is_mapped(view))
fprintf(fp, "\t[view is not mapped!]\n");
if (!weston_surface_is_mapped(view->surface))
fprintf(fp, "\t[surface is not mapped!]\n");
box = pixman_region32_extents(&view->transform.boundingbox);
fprintf(fp, "\t\tposition: (%d, %d) -> (%d, %d)\n",
box->x1, box->y1, box->x2, box->y2);

Loading…
Cancel
Save