Blender  V3.3
deg_eval_stats.cc
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2017 Blender Foundation. All rights reserved. */
3 
9 
10 #include "BLI_utildefines.h"
11 
12 #include "intern/depsgraph.h"
13 
14 #include "intern/node/deg_node.h"
18 
19 namespace blender::deg {
20 
22 {
23  /* Reset current evaluation stats for ID and component nodes.
24  * Those are not filled in by the evaluation engine. */
25  for (Node *node : graph->id_nodes) {
26  IDNode *id_node = (IDNode *)node;
27  for (ComponentNode *comp_node : id_node->components.values()) {
28  comp_node->stats.reset_current();
29  }
31  }
32  /* Now accumulate operation timings to components and IDs. */
33  for (OperationNode *op_node : graph->operations) {
34  ComponentNode *comp_node = op_node->owner;
35  IDNode *id_node = comp_node->owner;
37  comp_node->stats.current_time += op_node->stats.current_time;
38  }
39 }
40 
41 } // namespace blender::deg
OperationNode * node
Depsgraph * graph
const IDNode * id_node
void deg_eval_stats_aggregate(Depsgraph *graph)
OperationNodes operations
Definition: depsgraph.h:120
IDDepsNodes id_nodes
Definition: depsgraph.h:86
Map< ComponentIDKey, ComponentNode * > components
Definition: deg_node_id.h:80