From f85d1520a01fe433fde857462a1d431db6a5d956 Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Fri, 24 Sep 2010 01:01:33 +0100 Subject: [PATCH] material: tweak dot file debug code When using the debug function _cogl_debug_dump_materials_dot_file to write a dot file representing the sparse graph of material state we now only show a link between materials and layers when the material directly owns that layer reference (i.e. just those referenced in material->layer_differences) This makes it possible to see when ancestors of a material are being deferred too for layer state. For example when looking at the graph if you see that a material has an n_layers of 3 but there is only a link to 2 layers, then you know you need to look at it's ancestors to find the last layer. --- cogl/cogl-material.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cogl/cogl-material.c b/cogl/cogl-material.c index 985ebe2db..034e973dc 100644 --- a/cogl/cogl-material.c +++ b/cogl/cogl-material.c @@ -5615,7 +5615,11 @@ dump_material_cb (CoglMaterialNode *node, void *user_data) } if (layers) - _cogl_material_foreach_layer_internal (material, dump_layer_ref_cb, state); + { + g_list_foreach (material->layer_differences, + (GFunc)dump_layer_ref_cb, + state); + } state_out.parent_id = material_id;