[Bf-blender-cvs] [2f69266c643] master: Cleanup: use topology cache for frame timings overlay
Iliya Katueshenock
noreply at git.blender.org
Mon Nov 21 16:11:32 CET 2022
Commit: 2f69266c643ee4aab38a2221aeefc87f081c7782
Author: Iliya Katueshenock
Date: Mon Nov 21 16:10:05 2022 +0100
Branches: master
https://developer.blender.org/rB2f69266c643ee4aab38a2221aeefc87f081c7782
Cleanup: use topology cache for frame timings overlay
Differential Revision: https://developer.blender.org/D16571
===================================================================
M source/blender/editors/space_node/node_draw.cc
===================================================================
diff --git a/source/blender/editors/space_node/node_draw.cc b/source/blender/editors/space_node/node_draw.cc
index 6dd3f07b4c2..3d553ff3b0b 100644
--- a/source/blender/editors/space_node/node_draw.cc
+++ b/source/blender/editors/space_node/node_draw.cc
@@ -1705,16 +1705,13 @@ static std::optional<std::chrono::nanoseconds> node_get_execution_time(
if (node.type == NODE_GROUP_OUTPUT) {
return tree_log->run_time_sum;
}
- if (node.type == NODE_FRAME) {
+ else if (node.is_frame()) {
/* Could be cached in the future if this recursive code turns out to be slow. */
std::chrono::nanoseconds run_time{0};
bool found_node = false;
- LISTBASE_FOREACH (bNode *, tnode, &ntree.nodes) {
- if (tnode->parent != &node) {
- continue;
- }
- if (tnode->type == NODE_FRAME) {
+ for (const bNode *tnode : node.direct_children_in_frame()) {
+ if (tnode->is_frame()) {
std::optional<std::chrono::nanoseconds> sub_frame_run_time = node_get_execution_time(
tree_draw_ctx, ntree, *tnode);
if (sub_frame_run_time.has_value()) {
More information about the Bf-blender-cvs
mailing list