Blender V4.3
COM_realize_on_domain_operation.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 "GPU_shader.hh"
8
9#include "COM_context.hh"
10#include "COM_domain.hh"
12#include "COM_result.hh"
14
16
17/* ------------------------------------------------------------------------------------------------
18 * Realize On Domain Operation
19 *
20 * A simple operation that projects the input on a certain target domain, copies the area of the
21 * input that intersects the target domain, and fill the rest with zeros or repetitions of the
22 * input depending on the realization options of the target domain. See the discussion in
23 * COM_domain.hh for more information. */
25 private:
26 /* The target domain to realize the input on. */
27 Domain domain_;
28
29 public:
30 RealizeOnDomainOperation(Context &context, Domain domain, ResultType type);
31
32 void execute() override;
33
34 /* Determine if a realize on domain operation is needed for the input with the given result and
35 * descriptor in an operation with the given operation domain. If it is not needed, return a null
36 * pointer. If it is needed, return an instance of the operation. */
38 const Result &input_result,
39 const InputDescriptor &input_descriptor,
40 const Domain &operation_domain);
41
42 protected:
43 /* The operation domain is just the target domain. */
44 Domain compute_domain() override;
45};
46
47} // namespace blender::realtime_compositor
RealizeOnDomainOperation(Context &context, Domain domain, ResultType type)
static SimpleOperation * construct_if_needed(Context &context, const Result &input_result, const InputDescriptor &input_descriptor, const Domain &operation_domain)