diff options
author | Peter Klimenko <peterklimk@outlook.com> | 2020-07-31 11:45:15 +0300 |
---|---|---|
committer | Peter Klimenko <peterklimk@outlook.com> | 2020-07-31 11:45:15 +0300 |
commit | 97a4a8d0fb7fd9ac34f9f5d4d5a0689c01235e14 (patch) | |
tree | fc9746d2210eda08be9d44ae67d5e58d64b48b40 /source/blender/depsgraph/intern/builder/deg_builder_cache.h | |
parent | 4a7c203e9ecc7c5b0370afc0fdd6bcc183dc00df (diff) | |
parent | f3e8326453ae856d7914e45e832a2ed80aa9a9b9 (diff) |
merge
Diffstat (limited to 'source/blender/depsgraph/intern/builder/deg_builder_cache.h')
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_cache.h | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_cache.h b/source/blender/depsgraph/intern/builder/deg_builder_cache.h index bb4e1f5c96a..e04ae3a3727 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_cache.h +++ b/source/blender/depsgraph/intern/builder/deg_builder_cache.h @@ -23,6 +23,8 @@ #pragma once +#include "MEM_guardedalloc.h" + #include "intern/depsgraph_type.h" #include "RNA_access.h" @@ -31,7 +33,8 @@ struct ID; struct PointerRNA; struct PropertyRNA; -namespace DEG { +namespace blender { +namespace deg { class DepsgraphBuilderCache; @@ -44,14 +47,14 @@ class AnimatedPropertyID { AnimatedPropertyID(ID *id, StructRNA *type, const char *property_name); AnimatedPropertyID(ID *id, StructRNA *type, void *data, const char *property_name); - uint32_t hash() const; - - bool operator<(const AnimatedPropertyID &other) const; + uint64_t hash() const; friend bool operator==(const AnimatedPropertyID &a, const AnimatedPropertyID &b); /* Corresponds to PointerRNA.data. */ void *data; const PropertyRNA *property_rna; + + MEM_CXX_CLASS_ALLOC_FUNCS("AnimatedPropertyID"); }; class AnimatedPropertyStorage { @@ -71,9 +74,9 @@ class AnimatedPropertyStorage { /* indexed by PointerRNA.data. */ Set<AnimatedPropertyID> animated_properties_set; -}; -typedef map<ID *, AnimatedPropertyStorage *> AnimatedPropertyStorageMap; + MEM_CXX_CLASS_ALLOC_FUNCS("AnimatedPropertyStorage"); +}; /* Cached data which can be re-used by multiple builders. */ class DepsgraphBuilderCache { @@ -100,7 +103,10 @@ class DepsgraphBuilderCache { return animated_property_storage->isPropertyAnimated(args...); } - AnimatedPropertyStorageMap animated_property_storage_map_; + Map<ID *, AnimatedPropertyStorage *> animated_property_storage_map_; + + MEM_CXX_CLASS_ALLOC_FUNCS("DepsgraphBuilderCache"); }; -} // namespace DEG +} // namespace deg +} // namespace blender |