Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-04-23 17:42:37 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-04-23 17:42:37 +0300
commit53d69e6d048f918b2c9ee61d3e9f27db64fdfa52 (patch)
treebca3d93b8266df10f90019cbf7b070e547c8bd03 /source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc
parent0ca7a78f20db6f34bf158f671fc5bbc32ee5702c (diff)
Depsgraph: Add relation flag to avoid flush across it
This way we can avoid re-evaluation of certain parts of datablock when something unrelated has changed.
Diffstat (limited to 'source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc')
-rw-r--r--source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc25
1 files changed, 22 insertions, 3 deletions
diff --git a/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc b/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc
index 7b93434710b..80772f9595f 100644
--- a/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc
+++ b/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc
@@ -256,6 +256,18 @@ static void deg_debug_graphviz_relation_color(const DebugContext &ctx,
deg_debug_fprintf(ctx, "%s", color);
}
+static void deg_debug_graphviz_relation_style(const DebugContext &ctx,
+ const DepsRelation *rel)
+{
+ const char *style_default = "solid";
+ const char *style_no_flush = "dashed";
+ const char *style = style_default;
+ if (rel->flag & DEPSREL_FLAG_NO_FLUSH) {
+ style = style_no_flush;
+ }
+ deg_debug_fprintf(ctx, "%s", style);
+}
+
static void deg_debug_graphviz_node_style(const DebugContext &ctx, const DepsNode *node)
{
const char *base_style = "filled"; /* default style */
@@ -469,16 +481,23 @@ static void deg_debug_graphviz_node_relations(const DebugContext &ctx,
/* Note: without label an id seem necessary to avoid bugs in graphviz/dot */
deg_debug_fprintf(ctx, "id=\"%s\"", rel->name);
// deg_debug_fprintf(ctx, "label=\"%s\"", rel->name);
- deg_debug_fprintf(ctx, ",color="); deg_debug_graphviz_relation_color(ctx, rel);
+ deg_debug_fprintf(ctx, ",color=");
+ deg_debug_graphviz_relation_color(ctx, rel);
+ deg_debug_fprintf(ctx, ",style=");
+ deg_debug_graphviz_relation_style(ctx, rel);
deg_debug_fprintf(ctx, ",penwidth=\"%f\"", penwidth);
/* NOTE: edge from node to own cluster is not possible and gives graphviz
* warning, avoid this here by just linking directly to the invisible
* placeholder node
*/
- if (deg_debug_graphviz_is_cluster(tail) && !deg_debug_graphviz_is_owner(head, tail)) {
+ if (deg_debug_graphviz_is_cluster(tail) &&
+ !deg_debug_graphviz_is_owner(head, tail))
+ {
deg_debug_fprintf(ctx, ",ltail=\"cluster_%p\"", tail);
}
- if (deg_debug_graphviz_is_cluster(head) && !deg_debug_graphviz_is_owner(tail, head)) {
+ if (deg_debug_graphviz_is_cluster(head) &&
+ !deg_debug_graphviz_is_owner(tail, head))
+ {
deg_debug_fprintf(ctx, ",lhead=\"cluster_%p\"", head);
}
deg_debug_fprintf(ctx, "];" NL);