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-19 16:21:51 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-09-19 17:10:12 +0300
commitafb4da6650daeb8b8ac5fe9d3a6439c3433d7dc5 (patch)
treee98a5ce287522896b088257e45ae18f1f731709d /source/blender/depsgraph/intern/depsgraph_tag.cc
parentcc061d349b253583d8120e6e7be56d09f96c639e (diff)
Despgraph: Keep track of per-component visibility
The idea of those flags is to avoid evaluation of operations which are not needed to bring visible objects to an up to date state. Previously, dependency graph attempted to do combine those into an ID level flag. In practice it proved to be rather tricky, since there could be dependency cycles on ID level which will not exist on component level.
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph_tag.cc')
-rw-r--r--source/blender/depsgraph/intern/depsgraph_tag.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc
index 79f103a3b8f..4d4e0e8be15 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -485,14 +485,17 @@ void deg_id_tag_update(Main *bmain, ID *id, int flag)
void deg_graph_on_visible_update(Main *bmain, Depsgraph *graph)
{
+ /* TODO(sergey): We might want to tag components which did not affect
+ * anything visible before new objects became visible.
+ */
foreach (DEG::IDDepsNode *id_node, graph->id_nodes) {
- if (!id_node->is_visible) {
+ if (!id_node->is_directly_visible) {
/* ID is not visible within the current dependency graph, no need
* botherwith it to tag or anything.
*/
continue;
}
- if (id_node->is_previous_visible) {
+ if (id_node->is_previous_directly_visible) {
/* The ID was already visible and evaluated, all the subsequent
* updates and tags are to be done explicitly.
*/
@@ -527,7 +530,7 @@ void deg_graph_on_visible_update(Main *bmain, Depsgraph *graph)
* tags we request from here will be applied in the updated state of
* dependency graph.
*/
- id_node->is_previous_visible = true;
+ id_node->is_previous_directly_visible = true;
}
}