Blender
V5.0
source
blender
compositor
COM_derived_resources.hh
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2025 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
5
#pragma once
6
7
#include "
COM_denoised_auxiliary_pass.hh
"
8
9
namespace
blender::compositor
{
10
11
/* -------------------------------------------------------------------------------------------------
12
* Derived Resources.
13
*
14
* Derived resources are resources that are computed from a particular result, stored in it, and
15
* freed when the result is freed. The same resources might be needed by multiple operations, so
16
* caching them on the result will improve performance at the cost of higher memory usage.
17
*
18
* The DerivedResources class stores instances of the container classes that store derived
19
* resources. This is very similar in design to the StaticCacheManager, see its description for
20
* more information. Destroying an instance of this class is expected to destroy all derived
21
* resources in it.
22
*
23
* To add a new derived resource:
24
*
25
* - Create a key class that can be used to identify the resource in a Map if needed.
26
* - Create a resource class to compute and store the resource.
27
* - Create a container class to store the resources in a map identified by their keys.
28
* - Add an instance of the container to the DerivedResources class.
29
*
30
* See the existing derived resources for reference. */
31
class
DerivedResources
{
32
public
:
33
DenoisedAuxiliaryPassContainer
denoised_auxiliary_passes
;
34
};
35
36
}
// namespace blender::compositor
COM_denoised_auxiliary_pass.hh
blender::compositor::DenoisedAuxiliaryPassContainer
Definition
COM_denoised_auxiliary_pass.hh:85
blender::compositor::DerivedResources
Definition
COM_derived_resources.hh:31
blender::compositor::DerivedResources::denoised_auxiliary_passes
DenoisedAuxiliaryPassContainer denoised_auxiliary_passes
Definition
COM_derived_resources.hh:33
blender::compositor
Definition
BKE_node.hh:77
Generated on
for Blender by
doxygen
1.16.1