Blender V4.3
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
10
11#include "BLI_utildefines.h"
12
13#include "intern/depsgraph.hh"
14
19
20namespace blender::deg {
21
23{
24 /* Reset current evaluation stats for ID and component nodes.
25 * Those are not filled in by the evaluation engine. */
26 for (Node *node : graph->id_nodes) {
27 IDNode *id_node = (IDNode *)node;
28 for (ComponentNode *comp_node : id_node->components.values()) {
29 comp_node->stats.reset_current();
30 }
32 }
33 /* Now accumulate operation timings to components and IDs. */
34 for (OperationNode *op_node : graph->operations) {
35 ComponentNode *comp_node = op_node->owner;
36 IDNode *id_node = comp_node->owner;
37 id_node->stats.current_time += op_node->stats.current_time;
38 comp_node->stats.current_time += op_node->stats.current_time;
39 }
40}
41
42} // namespace blender::deg
const IDNode * id_node
void deg_eval_stats_aggregate(Depsgraph *graph)
Map< ComponentIDKey, ComponentNode * > components