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/builder/deg_builder_relations_impl.h
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/builder/deg_builder_relations_impl.h')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations_impl.h28
1 files changed, 16 insertions, 12 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations_impl.h b/source/blender/depsgraph/intern/builder/deg_builder_relations_impl.h
index b7dd05517cf..570227601db 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations_impl.h
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_impl.h
@@ -46,17 +46,17 @@ OperationDepsNode *DepsgraphRelationBuilder::find_operation_node(const KeyType&
}
template <typename KeyFrom, typename KeyTo>
-void DepsgraphRelationBuilder::add_relation(const KeyFrom &key_from,
- const KeyTo &key_to,
- const char *description,
- bool check_unique)
+DepsRelation *DepsgraphRelationBuilder::add_relation(const KeyFrom &key_from,
+ const KeyTo &key_to,
+ const char *description,
+ bool check_unique)
{
DepsNode *node_from = get_node(key_from);
DepsNode *node_to = get_node(key_to);
OperationDepsNode *op_from = node_from ? node_from->get_exit_operation() : NULL;
OperationDepsNode *op_to = node_to ? node_to->get_entry_operation() : NULL;
if (op_from && op_to) {
- add_operation_relation(op_from, op_to, description, check_unique);
+ return add_operation_relation(op_from, op_to, description, check_unique);
}
else {
if (!op_from) {
@@ -78,24 +78,27 @@ void DepsgraphRelationBuilder::add_relation(const KeyFrom &key_from,
description, key_to.identifier().c_str());
}
}
+ return NULL;
}
template <typename KeyTo>
-void DepsgraphRelationBuilder::add_relation(const TimeSourceKey &key_from,
- const KeyTo &key_to,
- const char *description,
- bool check_unique)
+DepsRelation *DepsgraphRelationBuilder::add_relation(
+ const TimeSourceKey &key_from,
+ const KeyTo &key_to,
+ const char *description,
+ bool check_unique)
{
TimeSourceDepsNode *time_from = get_node(key_from);
DepsNode *node_to = get_node(key_to);
OperationDepsNode *op_to = node_to ? node_to->get_entry_operation() : NULL;
if (time_from != NULL && op_to != NULL) {
- add_time_relation(time_from, op_to, description, check_unique);
+ return add_time_relation(time_from, op_to, description, check_unique);
}
+ return NULL;
}
template <typename KeyType>
-void DepsgraphRelationBuilder::add_node_handle_relation(
+DepsRelation *DepsgraphRelationBuilder::add_node_handle_relation(
const KeyType &key_from,
const DepsNodeHandle *handle,
const char *description,
@@ -105,7 +108,7 @@ void DepsgraphRelationBuilder::add_node_handle_relation(
OperationDepsNode *op_from = node_from ? node_from->get_exit_operation() : NULL;
OperationDepsNode *op_to = handle->node->get_entry_operation();
if (op_from != NULL && op_to != NULL) {
- add_operation_relation(op_from, op_to, description, check_unique);
+ return add_operation_relation(op_from, op_to, description, check_unique);
}
else {
if (!op_from) {
@@ -117,6 +120,7 @@ void DepsgraphRelationBuilder::add_node_handle_relation(
description, key_from.identifier().c_str());
}
}
+ return NULL;
}
template <typename KeyType>