[Bf-blender-cvs] [5f814cb3b47] master: Depsgraph: Don't tag original IDs

Sergey Sharybin noreply at git.blender.org
Fri Feb 15 10:56:54 CET 2019


Commit: 5f814cb3b47df9255724e979458e05a42ed40f9a
Author: Sergey Sharybin
Date:   Thu Feb 14 12:20:51 2019 +0100
Branches: master
https://developer.blender.org/rB5f814cb3b47df9255724e979458e05a42ed40f9a

Depsgraph: Don't tag original IDs

This is unreliable for cases when multiple dependency graphs
are to be updated.

The only reason why it was attempted to be made is to deal
with cases when ID appears in the dependency graph for the
first time. But even then it should be smart enough bring
itself to an up-to-date state without any extra tricks.

===================================================================

M	source/blender/depsgraph/intern/depsgraph_tag.cc
M	source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
M	source/blender/depsgraph/intern/eval/deg_eval_flush.cc

===================================================================

diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc
index 474bbd7b3e9..fd254d6ad3b 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -280,7 +280,6 @@ void depsgraph_tag_component(Depsgraph *graph,
 		ComponentNode *cow_comp =
 		        id_node->find_component(NodeType::COPY_ON_WRITE);
 		cow_comp->tag_update(graph, update_source);
-		id_node->id_orig->recalc |= ID_RECALC_COPY_ON_WRITE;
 	}
 }
 
@@ -758,7 +757,6 @@ static void deg_graph_clear_id_node_func(
 	DEG::Depsgraph *deg_graph = reinterpret_cast<DEG::Depsgraph *>(data_v);
 	DEG::IDNode *id_node = deg_graph->id_nodes[i];
 	id_node->id_cow->recalc &= ~ID_RECALC_ALL;
-	id_node->id_orig->recalc &= ~ID_RECALC_ALL;
 
 	/* Clear embedded node trees too. */
 	bNodeTree *ntree_cow = ntreeFromID(id_node->id_cow);
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
index 32212b0e1c1..e8a7a2a735f 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
@@ -684,7 +684,6 @@ ID *deg_expand_copy_on_write_datablock(const Depsgraph *depsgraph,
 {
 	const ID *id_orig = id_node->id_orig;
 	ID *id_cow = id_node->id_cow;
-	const int id_cow_recalc = id_cow->recalc;
 	/* No need to expand such datablocks, their copied ID is same as original
 	 * one already. */
 	if (!deg_copy_on_write_is_needed(id_orig)) {
@@ -761,7 +760,6 @@ ID *deg_expand_copy_on_write_datablock(const Depsgraph *depsgraph,
 	/* Correct or tweak some pointers which are not taken care by foreach
 	 * from above. */
 	update_special_pointers(depsgraph, id_orig, id_cow);
-	id_cow->recalc = id_orig->recalc | id_cow_recalc;
 	return id_cow;
 }
 
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
index e408314a340..351e6901015 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
@@ -248,10 +248,6 @@ void flush_editors_id_update(Main *bmain,
 		/* TODO(sergey): Do we need to pass original or evaluated ID here? */
 		ID *id_orig = id_node->id_orig;
 		ID *id_cow = id_node->id_cow;
-		/* Copy tag from original data to CoW storage.
-		 * This is because DEG_id_tag_update() sets tags on original
-		 * data. */
-		id_cow->recalc |= (id_orig->recalc & ID_RECALC_ALL);
 		/* Gather recalc flags from all changed components. */
 		GHASH_FOREACH_BEGIN(ComponentNode *, comp_node, id_node->components)
 		{



More information about the Bf-blender-cvs mailing list