Blender V4.5
COM_symmetric_separable_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_array.hh"
11#include "BLI_map.hh"
12
14#include "COM_result.hh"
15
16namespace blender::compositor {
17
18class Context;
19
20/* -------------------------------------------------------------------- */
23
25 public:
26 int type;
27 float radius;
28
30
31 uint64_t hash() const;
32};
33
36
38
39/* -------------------------------------------------------------------- */
47
49 private:
50 Array<float> weights_;
51
52 public:
54
55 SymmetricSeparableBlurWeights(Context &context, int type, float radius);
56
58};
59
61
62/* -------------------------------------------------------------------- */
65
67 private:
69
70 public:
71 void reset() override;
72
73 /* Check if there is an available SymmetricSeparableBlurWeights cached resource with the given
74 * parameters in the container, if one exists, return it, otherwise, return a newly created one
75 * and add it to the container. In both cases, tag the cached resource as needed to keep it
76 * cached for the next evaluation. */
77 Result &get(Context &context, int type, float radius);
78};
79
81
82} // namespace blender::compositor
unsigned long long int uint64_t
SymmetricSeparableBlurWeights(Context &context, int type, float radius)
bool operator==(const BokehKernelKey &a, const BokehKernelKey &b)