diff options
author | Jacques Lucke <jacques@blender.org> | 2022-05-18 17:42:49 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-05-18 17:42:49 +0300 |
commit | f517b3a29568fd43b722973c7c46d3c358ba0dda (patch) | |
tree | c166fc983bb0a717fcf3e49f6f2bd604dc8998a3 /source/blender/makesdna/DNA_node_types.h | |
parent | 136a06285f0e953f65dc432a4dba1ff3d1f781ee (diff) |
Fix T98157: improve animation fps with better check in depsgraph
Previously, the depsgraph assumed that every node tree might contain
a reference to a video. This resulted noticeable overhead when there
was no video.
Checking whether a node tree contained a video was relatively expensive
to do in the depsgraph. It is cheaper now due to the structure of the new
node tree updater.
This also adds an additional run-time field to `bNodeTree` (there are
quite a few already). We should move those to a separate run-time
struct, but not as part of a bug fix.
Differential Revision: https://developer.blender.org/D14957
Diffstat (limited to 'source/blender/makesdna/DNA_node_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_node_types.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index d18fe1b81dd..b66fe31c00e 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -499,7 +499,13 @@ typedef struct bNodeTree { int type; - char _pad1[4]; + /** + * Used to cache run-time information of the node tree. + * #eNodeTreeRuntimeFlag. + */ + uint8_t runtime_flag; + + char _pad1[3]; /** * Sockets in groups have unique identifiers, adding new sockets always @@ -601,6 +607,11 @@ typedef enum eNodeTreeExecutionMode { NTREE_EXECUTION_MODE_FULL_FRAME = 1, } eNodeTreeExecutionMode; +typedef enum eNodeTreeRuntimeFlag { + /** There is a node that references an image with animation. */ + NTREE_RUNTIME_FLAG_HAS_IMAGE_ANIMATION = 1 << 0, +} eNodeTreeRuntimeFlag; + /* socket value structs for input buttons * DEPRECATED now using ID properties */ |