Changeset View
Changeset View
Standalone View
Standalone View
source/blender/compositor/operations/COM_GlareBaseOperation.h
| Show All 34 Lines | #define fRGB_rgbmult(c, r, g, b) \ | ||||
| c[1] *= (g); \ | c[1] *= (g); \ | ||||
| c[2] *= (b); \ | c[2] *= (b); \ | ||||
| } \ | } \ | ||||
| (void)0 | (void)0 | ||||
| class GlareBaseOperation : public SingleThreadedOperation { | class GlareBaseOperation : public SingleThreadedOperation { | ||||
| private: | private: | ||||
| /** | /** | ||||
| * \brief Cached reference to the inputProgram | |||||
| */ | |||||
| SocketReader *m_inputProgram; | |||||
| /** | |||||
| * \brief settings of the glare node. | * \brief settings of the glare node. | ||||
| */ | */ | ||||
| NodeGlare *m_settings; | NodeGlare *m_settings; | ||||
| public: | public: | ||||
| /** | |||||
| * Initialize the execution | |||||
| */ | |||||
| void initExecution() override; | |||||
| /** | |||||
| * Deinitialize the execution | |||||
| */ | |||||
| void deinitExecution() override; | |||||
| void setGlareSettings(NodeGlare *settings) | void setGlareSettings(NodeGlare *settings) | ||||
| { | { | ||||
| this->m_settings = settings; | this->m_settings = settings; | ||||
| } | } | ||||
| bool determineDependingAreaOfInterest(rcti *input, | |||||
| ReadBufferOperation *readOperation, | |||||
| rcti *output) override; | |||||
| protected: | protected: | ||||
| GlareBaseOperation(); | GlareBaseOperation(); | ||||
| virtual void generateGlare(float *data, MemoryBuffer *inputTile, NodeGlare *settings) = 0; | virtual void generateGlare(float *data, MemoryBuffer *inputTile, NodeGlare *settings) = 0; | ||||
| MemoryBuffer *createMemoryBuffer(rcti *rect) override; | void update_memory_buffer(MemoryBuffer *output_buffer, | ||||
| rcti *output_rect, | |||||
| blender::Span<MemoryBuffer *> inputs) override; | |||||
| void get_input_area_of_interest(int input_socket_index, | |||||
| const rcti *output_rect, | |||||
| rcti *r_input_area) override; | |||||
| }; | }; | ||||
| } // namespace blender::compositor | } // namespace blender::compositor | ||||