Listing the "Blender Foundation" as copyright holder implied the Blender Foundation holds copyright to files which may include work from many developers. While keeping copyright on headers makes sense for isolated libraries, Blender's own code may be refactored or moved between files in a way that makes the per file copyright holders less meaningful. Copyright references to the "Blender Foundation" have been replaced with "Blender Authors", with the exception of `./extern/` since these this contains libraries which are more isolated, any changed to license headers there can be handled on a case-by-case basis. Some directories in `./intern/` have also been excluded: - `./intern/cycles/` it's own `AUTHORS` file is planned. - `./intern/opensubdiv/`. An "AUTHORS" file has been added, using the chromium projects authors file as a template. Design task: #110784 Ref !110783.
43 lines
1.2 KiB
C++
43 lines
1.2 KiB
C++
/* SPDX-FileCopyrightText: 2017 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/** \file
|
|
* \ingroup depsgraph
|
|
*/
|
|
|
|
#include "intern/eval/deg_eval_stats.h"
|
|
|
|
#include "BLI_utildefines.h"
|
|
|
|
#include "intern/depsgraph.h"
|
|
|
|
#include "intern/node/deg_node.h"
|
|
#include "intern/node/deg_node_component.h"
|
|
#include "intern/node/deg_node_id.h"
|
|
#include "intern/node/deg_node_operation.h"
|
|
|
|
namespace blender::deg {
|
|
|
|
void deg_eval_stats_aggregate(Depsgraph *graph)
|
|
{
|
|
/* Reset current evaluation stats for ID and component nodes.
|
|
* Those are not filled in by the evaluation engine. */
|
|
for (Node *node : graph->id_nodes) {
|
|
IDNode *id_node = (IDNode *)node;
|
|
for (ComponentNode *comp_node : id_node->components.values()) {
|
|
comp_node->stats.reset_current();
|
|
}
|
|
id_node->stats.reset_current();
|
|
}
|
|
/* Now accumulate operation timings to components and IDs. */
|
|
for (OperationNode *op_node : graph->operations) {
|
|
ComponentNode *comp_node = op_node->owner;
|
|
IDNode *id_node = comp_node->owner;
|
|
id_node->stats.current_time += op_node->stats.current_time;
|
|
comp_node->stats.current_time += op_node->stats.current_time;
|
|
}
|
|
}
|
|
|
|
} // namespace blender::deg
|