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-09-03 15:35:42 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-09-03 16:20:06 +0300
commitd57cb8fa22eb757e0960cb1336f00e495519a939 (patch)
tree0b8c3267b56524233f36c766a80a3d17c5523d4d /source/blender/depsgraph/intern/builder/deg_builder_transitive.cc
parente152483a320d2da88199697da02ddb2befc73778 (diff)
Depsgraph: Use more meaningful name for flags storage
Diffstat (limited to 'source/blender/depsgraph/intern/builder/deg_builder_transitive.cc')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_transitive.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_transitive.cc b/source/blender/depsgraph/intern/builder/deg_builder_transitive.cc
index 17e64c5f685..a39b18f2f0a 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_transitive.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_transitive.cc
@@ -65,16 +65,16 @@ enum {
static void deg_graph_tag_paths_recursive(DepsNode *node)
{
- if (node->done & OP_VISITED) {
+ if (node->custom_flags & OP_VISITED) {
return;
}
- node->done |= OP_VISITED;
+ node->custom_flags |= OP_VISITED;
foreach (DepsRelation *rel, node->inlinks) {
deg_graph_tag_paths_recursive(rel->from);
/* Do this only in inlinks loop, so the target node does not get
* flagged.
*/
- rel->from->done |= OP_REACHABLE;
+ rel->from->custom_flags |= OP_REACHABLE;
}
}
@@ -84,13 +84,13 @@ void deg_graph_transitive_reduction(Depsgraph *graph)
foreach (OperationDepsNode *target, graph->operations) {
/* Clear tags. */
foreach (OperationDepsNode *node, graph->operations) {
- node->done = 0;
+ node->custom_flags = 0;
}
/* Mark nodes from which we can reach the target
* start with children, so the target node and direct children are not
* flagged.
*/
- target->done |= OP_VISITED;
+ target->custom_flags |= OP_VISITED;
foreach (DepsRelation *rel, target->inlinks) {
deg_graph_tag_paths_recursive(rel->from);
}
@@ -101,13 +101,14 @@ void deg_graph_transitive_reduction(Depsgraph *graph)
{
DepsRelation *rel = *it_rel;
if (rel->from->type == DEG_NODE_TYPE_TIMESOURCE) {
- /* HACK: time source nodes don't get "done" flag set/cleared. */
+ /* HACK: time source nodes don't get "custom_flags" flag
+ * set/cleared. */
/* TODO: there will be other types in future, so iterators above
* need modifying.
*/
++it_rel;
}
- else if (rel->from->done & OP_REACHABLE) {
+ else if (rel->from->custom_flags & OP_REACHABLE) {
rel->unlink();
OBJECT_GUARDED_DELETE(rel, DepsRelation);
++num_removed_relations;