Blender V5.0
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
8
9namespace 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. */
35
36} // namespace blender::compositor
DenoisedAuxiliaryPassContainer denoised_auxiliary_passes