Instead of the monolothic `depsgraph_type.hh` header that includes most types used in the despgraph, just add includes where they are actually necessary. Also remove the `using` keywords for `std` types. The lack of specificity isn't considered good practice nowadays. Removing unnecessary transitive includes can help improve compile times because the time spent parsing headers decreases. Using the "include what you use" pattern makes futher improvements much easier too, since it the path to further reduce transitive includes becomes much clearer. Pull Request: https://projects.blender.org/blender/blender/pulls/133749
57 lines
1.5 KiB
C++
57 lines
1.5 KiB
C++
/* SPDX-FileCopyrightText: 2020 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#include "pipeline_render.h"
|
|
|
|
#include "intern/builder/deg_builder_nodes.h"
|
|
#include "intern/builder/deg_builder_relations.h"
|
|
#include "intern/depsgraph.hh"
|
|
|
|
namespace blender::deg {
|
|
|
|
namespace {
|
|
|
|
class RenderDepsgraphNodeBuilder : public DepsgraphNodeBuilder {
|
|
public:
|
|
using DepsgraphNodeBuilder::DepsgraphNodeBuilder;
|
|
|
|
void build_idproperties(IDProperty * /*id_property*/) override {}
|
|
};
|
|
|
|
class RenderDepsgraphRelationBuilder : public DepsgraphRelationBuilder {
|
|
public:
|
|
using DepsgraphRelationBuilder::DepsgraphRelationBuilder;
|
|
|
|
void build_idproperties(IDProperty * /*id_property*/) override {}
|
|
};
|
|
|
|
} // namespace
|
|
|
|
RenderBuilderPipeline::RenderBuilderPipeline(::Depsgraph *graph) : AbstractBuilderPipeline(graph)
|
|
{
|
|
deg_graph_->is_render_pipeline_depsgraph = true;
|
|
}
|
|
|
|
std::unique_ptr<DepsgraphNodeBuilder> RenderBuilderPipeline::construct_node_builder()
|
|
{
|
|
return std::make_unique<RenderDepsgraphNodeBuilder>(bmain_, deg_graph_, &builder_cache_);
|
|
}
|
|
|
|
std::unique_ptr<DepsgraphRelationBuilder> RenderBuilderPipeline::construct_relation_builder()
|
|
{
|
|
return std::make_unique<RenderDepsgraphRelationBuilder>(bmain_, deg_graph_, &builder_cache_);
|
|
}
|
|
|
|
void RenderBuilderPipeline::build_nodes(DepsgraphNodeBuilder &node_builder)
|
|
{
|
|
node_builder.build_scene_render(scene_, view_layer_);
|
|
}
|
|
|
|
void RenderBuilderPipeline::build_relations(DepsgraphRelationBuilder &relation_builder)
|
|
{
|
|
relation_builder.build_scene_render(scene_, view_layer_);
|
|
}
|
|
|
|
} // namespace blender::deg
|