Changeset View
Changeset View
Standalone View
Standalone View
source/blender/compositor/operations/COM_ConstantOperation.h
| Show All 25 Lines | |||||
| * for all constant operations and make all initialization and deinitilization methods final. */ | * 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 | * 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 | * all their inputs are so, are evaluated into primitive constants (Color/Vector/Value) during | ||||
| * constant folding. | * constant folding. | ||||
| */ | */ | ||||
| class ConstantOperation : public NodeOperation { | class ConstantOperation : public NodeOperation { | ||||
| protected: | protected: | ||||
| bool needs_resolution_to_get_constant_; | bool needs_canvas_to_get_constant_; | ||||
| public: | public: | ||||
| ConstantOperation(); | ConstantOperation(); | ||||
| /** May require resolution to be already determined. */ | /** May require resolution to be already determined. */ | ||||
| virtual const float *get_constant_elem() = 0; | virtual const float *get_constant_elem() = 0; | ||||
| bool can_get_constant_elem() const; | bool can_get_constant_elem() const; | ||||
| void update_memory_buffer(MemoryBuffer *output, | void update_memory_buffer(MemoryBuffer *output, | ||||
| const rcti &area, | const rcti &area, | ||||
| Span<MemoryBuffer *> inputs) final; | Span<MemoryBuffer *> inputs) final; | ||||
| }; | }; | ||||
| } // namespace blender::compositor | } // namespace blender::compositor | ||||