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>2019-10-06 13:19:12 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-10-08 12:02:22 +0300
commit9d13321831d321e51683fae5df53b7d68a9dc2d7 (patch)
tree1e44e4a23333a69089b28c67e31a7f7faac5b4ad /source/blender/depsgraph
parentfda1db5ba41a70497881332f93e4eb366be47fcc (diff)
Depsgraph: Perform early exit check prior to time tag
Evaluation is not entirely cheap even in the case when there is nothing tagged in the scene. This is because of all the calculation of pending operations, cleating runtime flags and so on. This commit makes it so time operation is tagged for update prior to early exit check. Improves playback speed in a scene without anything animated. Maniphest Tasks: T70463 Differential Revision: https://developer.blender.org/D6002
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval_flush.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
index 2479373b687..fd5ecec0b5b 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
@@ -351,9 +351,6 @@ void deg_graph_flush_updates(Main *bmain, Depsgraph *graph)
BLI_assert(bmain != NULL);
BLI_assert(graph != NULL);
/* Nothing to update, early out. */
- if (BLI_gset_len(graph->entry_tags) == 0 && !graph->need_update_time) {
- return;
- }
if (graph->need_update_time) {
const Scene *scene_orig = graph->scene;
const float ctime = BKE_scene_frame_get(scene_orig);
@@ -361,6 +358,9 @@ void deg_graph_flush_updates(Main *bmain, Depsgraph *graph)
graph->ctime = ctime;
time_source->tag_update(graph, DEG::DEG_UPDATE_SOURCE_TIME);
}
+ if (BLI_gset_len(graph->entry_tags) == 0) {
+ return;
+ }
/* Reset all flags, get ready for the flush. */
flush_prepare(graph);
/* Starting from the tagged "entry" nodes, flush outwards. */