diff --git a/tools/gtk-rendernode-tool-info.c b/tools/gtk-rendernode-tool-info.c index 1508907eb8..69d339e18d 100644 --- a/tools/gtk-rendernode-tool-info.c +++ b/tools/gtk-rendernode-tool-info.c @@ -177,7 +177,7 @@ file_info (const char *filename) unsigned int total = 0; unsigned int namelen = 0; unsigned int depth = 0; - graphene_rect_t bounds; + graphene_rect_t bounds, opaque; node = load_node_file (filename); @@ -202,6 +202,15 @@ file_info (const char *filename) gsk_render_node_get_bounds (node, &bounds); g_print (_("Bounds: %g x %g\n"), bounds.size.width, bounds.size.height); g_print (_("Origin: %g %g\n"), bounds.origin.x, bounds.origin.y); + if (gsk_render_node_get_opaque_rect (node, &opaque)) + { + g_print (_("Opaque part: %g %g, %g x %g (%.0f%%)\n"), + opaque.origin.x, opaque.origin.y, + opaque.size.width, opaque.size.height, + 100 * (opaque.size.width * opaque.size.height) / (bounds.size.width * bounds.size.height)); + } + else + g_print (_("Opaque part: none\n")); gsk_render_node_unref (node); }