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.
This commit is contained in:
Robert Bragg 2010-09-24 01:01:33 +01:00
parent 51b090541a
commit f85d1520a0

View File

@ -5615,7 +5615,11 @@ dump_material_cb (CoglMaterialNode *node, void *user_data)
} }
if (layers) 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; state_out.parent_id = material_id;