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-25 15:58:19 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-04-25 17:34:55 +0300
commit09da47b67a28aa3dd814b5c7d309d3481b39e77c (patch)
tree727bd3064c8d483312f26d5b311fe0cdb1a768b0 /source/blender/depsgraph/intern/depsgraph.h
parenta9d3f9f54d6db8197b891ba4bdcc53bf6adeb113 (diff)
Depsgraph: Avoid hash lookup for every evaluated scene query
Cache pointer to evaluated scene datablock on relations build time, that pointer never changes after that.
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph.h')
-rw-r--r--source/blender/depsgraph/intern/depsgraph.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph.h b/source/blender/depsgraph/intern/depsgraph.h
index e10f7d5b115..284dc28031b 100644
--- a/source/blender/depsgraph/intern/depsgraph.h
+++ b/source/blender/depsgraph/intern/depsgraph.h
@@ -197,6 +197,11 @@ struct Depsgraph {
/* Time at which dependency graph is being or was last evaluated. */
float ctime;
+
+ /* Evaluated version of datablocks we access a lot.
+ * Stored here to save us form doing hash lookup.
+ */
+ Scene *scene_cow;
};
} // namespace DEG