This repository has been archived on 2023-10-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blender-archive/source/blender/compositor/operations/COM_ConstantOperation.h
Campbell Barton c434782e3a File headers: SPDX License migration
Use a shorter/simpler license convention, stops the header taking so
much space.

Follow the SPDX license specification: https://spdx.org/licenses

- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile

While most of the source tree has been included

- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
  use different header conventions.

doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.

See P2788 for the script that automated these edits.

Reviewed By: brecht, mont29, sergey

Ref D14069
2022-02-11 09:14:36 +11:00

34 lines
1.0 KiB
C++

/* SPDX-License-Identifier: GPL-2.0-or-later
* Copyright 2021 Blender Foundation. */
#pragma once
#include "COM_NodeOperation.h"
namespace blender::compositor {
/* TODO(manzanilla): After removing tiled implementation, implement a default #determine_resolution
* for all constant operations and make all initialization and deinitilization methods final. */
/**
* Base class for operations that are always constant. Operations that can be constant only when
* all their inputs are so, are evaluated into primitive constants (Color/Vector/Value) during
* constant folding.
*/
class ConstantOperation : public NodeOperation {
protected:
bool needs_canvas_to_get_constant_;
public:
ConstantOperation();
/** May require resolution to be already determined. */
virtual const float *get_constant_elem() = 0;
bool can_get_constant_elem() const;
void update_memory_buffer(MemoryBuffer *output,
const rcti &area,
Span<MemoryBuffer *> inputs) final;
};
} // namespace blender::compositor