From f906f5cc58559bc3e4d5593921fd2121f3c04d6b Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 21 Dec 2017 11:13:22 +0100 Subject: Depsgraph: Remove eval priority from debugger This needs to be redone anyway, to correspond to possibly new priorities calculated for evaluaiton. --- source/blender/blenkernel/intern/depsgraph.c | 2 +- source/blender/depsgraph/DEG_depsgraph_debug.h | 2 +- .../depsgraph/intern/debug/deg_debug_graphviz.cc | 18 ++---------------- source/blender/makesrna/intern/rna_depsgraph.c | 2 +- 4 files changed, 5 insertions(+), 19 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c index 81e88bd3019..985c758d5cb 100644 --- a/source/blender/blenkernel/intern/depsgraph.c +++ b/source/blender/blenkernel/intern/depsgraph.c @@ -3704,7 +3704,7 @@ void DAG_print_dependencies(Main *UNUSED(bmain), Scene *scene, Object *UNUSED(ob)) { - DEG_debug_graphviz(scene->depsgraph, stdout, "Depsgraph", false); + DEG_debug_graphviz(scene->depsgraph, stdout, "Depsgraph"); } #endif diff --git a/source/blender/depsgraph/DEG_depsgraph_debug.h b/source/blender/depsgraph/DEG_depsgraph_debug.h index 63ebe21d073..7d96b9ed602 100644 --- a/source/blender/depsgraph/DEG_depsgraph_debug.h +++ b/source/blender/depsgraph/DEG_depsgraph_debug.h @@ -51,7 +51,7 @@ void DEG_stats_simple(const struct Depsgraph *graph, /* ************************************************ */ /* Diagram-Based Graph Debugging */ -void DEG_debug_graphviz(const struct Depsgraph *graph, FILE *stream, const char *label, bool show_eval); +void DEG_debug_graphviz(const struct Depsgraph *graph, FILE *stream, const char *label); /* ************************************************ */ diff --git a/source/blender/depsgraph/intern/debug/deg_debug_graphviz.cc b/source/blender/depsgraph/intern/debug/deg_debug_graphviz.cc index 6d8fda97321..88954f6f0dc 100644 --- a/source/blender/depsgraph/intern/debug/deg_debug_graphviz.cc +++ b/source/blender/depsgraph/intern/debug/deg_debug_graphviz.cc @@ -139,7 +139,6 @@ static int deg_debug_node_color_index(const DepsNode *node) struct DebugContext { FILE *file; bool show_tags; - bool show_eval_priority; }; static void deg_debug_fprintf(const DebugContext &ctx, const char *fmt, ...) ATTR_PRINTF_FORMAT(2, 3); @@ -286,28 +285,17 @@ static void deg_debug_graphviz_node_single(const DebugContext &ctx, { const char *shape = "box"; string name = node->identifier(); - float priority = -1.0f; if (node->type == DEG_NODE_TYPE_ID_REF) { IDDepsNode *id_node = (IDDepsNode *)node; char buf[256]; BLI_snprintf(buf, sizeof(buf), " (Layers: %u)", id_node->layers); name += buf; } - if (ctx.show_eval_priority && node->get_class() == DEG_NODE_CLASS_OPERATION) { - priority = ((OperationDepsNode *)node)->eval_priority; - } deg_debug_fprintf(ctx, "// %s\n", name.c_str()); deg_debug_fprintf(ctx, "\"node_%p\"", node); deg_debug_fprintf(ctx, "["); // deg_debug_fprintf(ctx, "label=<%s>", name); - if (priority >= 0.0f) { - deg_debug_fprintf(ctx, "label=<%s
(%.2f)>", - name.c_str(), - priority); - } - else { - deg_debug_fprintf(ctx, "label=<%s>", name.c_str()); - } + deg_debug_fprintf(ctx, "label=<%s>", name.c_str()); deg_debug_fprintf(ctx, ",fontname=\"%s\"", deg_debug_graphviz_fontname); deg_debug_fprintf(ctx, ",fontsize=%f", deg_debug_graphviz_node_label_size); deg_debug_fprintf(ctx, ",shape=%s", shape); @@ -530,7 +518,7 @@ static void deg_debug_graphviz_graph_relations(const DebugContext &ctx, } // namespace DEG -void DEG_debug_graphviz(const Depsgraph *graph, FILE *f, const char *label, bool show_eval) +void DEG_debug_graphviz(const Depsgraph *graph, FILE *f, const char *label) { if (!graph) { return; @@ -540,8 +528,6 @@ void DEG_debug_graphviz(const Depsgraph *graph, FILE *f, const char *label, bool DEG::DebugContext ctx; ctx.file = f; - ctx.show_tags = show_eval; - ctx.show_eval_priority = show_eval; DEG::deg_debug_fprintf(ctx, "digraph depgraph {" NL); DEG::deg_debug_fprintf(ctx, "rankdir=LR;" NL); diff --git a/source/blender/makesrna/intern/rna_depsgraph.c b/source/blender/makesrna/intern/rna_depsgraph.c index adb99acef1f..14668001428 100644 --- a/source/blender/makesrna/intern/rna_depsgraph.c +++ b/source/blender/makesrna/intern/rna_depsgraph.c @@ -51,7 +51,7 @@ static void rna_Depsgraph_debug_graphviz(Depsgraph *graph, const char *filename) if (f == NULL) { return; } - DEG_debug_graphviz(graph, f, "Depsgraph", false); + DEG_debug_graphviz(graph, f, "Depsgraph"); fclose(f); } -- cgit v1.2.3