Blender V5.0
deg_eval_stats.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2017 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
10
11#include "intern/depsgraph.hh"
12
17
18namespace blender::deg {
19
21{
22 /* Reset current evaluation stats for ID and component nodes.
23 * Those are not filled in by the evaluation engine. */
24 for (Node *node : graph->id_nodes) {
25 IDNode *id_node = (IDNode *)node;
26 for (ComponentNode *comp_node : id_node->components.values()) {
27 comp_node->stats.reset_current();
28 }
29 id_node->stats.reset_current();
30 }
31 /* Now accumulate operation timings to components and IDs. */
32 for (OperationNode *op_node : graph->operations) {
33 ComponentNode *comp_node = op_node->owner;
34 IDNode *id_node = comp_node->owner;
35 id_node->stats.current_time += op_node->stats.current_time;
36 comp_node->stats.current_time += op_node->stats.current_time;
37 }
38}
39
40} // namespace blender::deg
void deg_eval_stats_aggregate(Depsgraph *graph)
OperationNodes operations
Definition depsgraph.hh:133
Map< ComponentIDKey, ComponentNode * > components