Blender V5.3
COM_symmetric_blur_weights.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
7#include <cstdint>
8#include <memory>
9
10#include "BLI_map.hh"
11#include "BLI_math_filter.hh"
13
15#include "COM_result.hh"
16
17namespace blender::compositor {
18
19class Context;
20
21/* ------------------------------------------------------------------------------------------------
22 * Symmetric Blur Weights Key.
23 */
33
35
36/* -------------------------------------------------------------------------------------------------
37 * Symmetric Blur Weights.
38 *
39 * A cached resource that computes and caches a result containing the weights of the filter of the
40 * given type and radius. The filter is assumed to be symmetric, because the filter functions are
41 * evaluated on the normalized distance to the center. Consequently, only the upper right quadrant
42 * are computed and the user takes that into consideration. */
51
52/* ------------------------------------------------------------------------------------------------
53 * Symmetric Blur Weights Container.
54 */
56 private:
58
59 public:
60 void reset() override;
61
62 /* Check if there is an available SymmetricBlurWeights cached resource with the given parameters
63 * in the container, if one exists, return it, otherwise, return a newly created one and add it
64 * to the container. In both cases, tag the cached resource as needed to keep it cached for the
65 * next evaluation. */
66 Result &get(Context &context, math::FilterKernel type, float2 radius);
67};
68
69} // namespace blender::compositor
Result & get(Context &context, math::FilterKernel type, float2 radius)
SymmetricBlurWeightsKey(math::FilterKernel type, float2 radius)
SymmetricBlurWeights(Context &context, math::FilterKernel type, float2 radius)
bool operator==(const BokehKernelKey &a, const BokehKernelKey &b)
unsigned __int64 uint64_t
Definition BKE_text.h:91