Changeset View
Changeset View
Standalone View
Standalone View
source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.h
| Show All 12 Lines | |||||
| * along with this program; if not, write to the Free Software Foundation, | * along with this program; if not, write to the Free Software Foundation, | ||||
| * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||||
| * | * | ||||
| * Copyright 2011, Blender Foundation. | * Copyright 2011, Blender Foundation. | ||||
| */ | */ | ||||
| #pragma once | #pragma once | ||||
| #include "COM_NodeOperation.h" | #include "COM_MultiThreadedOperation.h" | ||||
| namespace blender::compositor { | namespace blender::compositor { | ||||
| class DoubleEdgeMaskOperation : public NodeOperation { | class DoubleEdgeMaskOperation : public NodeOperation { | ||||
| private: | private: | ||||
| /** | /** | ||||
| * Cached reference to the inputProgram | * Cached reference to the inputProgram | ||||
| */ | */ | ||||
| SocketReader *m_inputOuterMask; | SocketReader *m_inputOuterMask; | ||||
| SocketReader *m_inputInnerMask; | SocketReader *m_inputInnerMask; | ||||
| bool m_adjacentOnly; | bool m_adjacentOnly; | ||||
| bool m_keepInside; | bool m_keepInside; | ||||
| /* TODO(manzanilla): To be removed with tiled implementation. */ | |||||
| float *m_cachedInstance; | float *m_cachedInstance; | ||||
| bool is_output_rendered_; | |||||
| public: | public: | ||||
| DoubleEdgeMaskOperation(); | DoubleEdgeMaskOperation(); | ||||
| void doDoubleEdgeMask(float *imask, float *omask, float *res); | void doDoubleEdgeMask(float *imask, float *omask, float *res); | ||||
| /** | /** | ||||
| * The inner loop of this operation. | * The inner loop of this operation. | ||||
| */ | */ | ||||
| void executePixel(float output[4], int x, int y, void *data) override; | void executePixel(float output[4], int x, int y, void *data) override; | ||||
| Show All 17 Lines | public: | ||||
| void setAdjecentOnly(bool adjacentOnly) | void setAdjecentOnly(bool adjacentOnly) | ||||
| { | { | ||||
| this->m_adjacentOnly = adjacentOnly; | this->m_adjacentOnly = adjacentOnly; | ||||
| } | } | ||||
| void setKeepInside(bool keepInside) | void setKeepInside(bool keepInside) | ||||
| { | { | ||||
| this->m_keepInside = keepInside; | this->m_keepInside = keepInside; | ||||
| } | } | ||||
| void get_area_of_interest(int input_idx, const rcti &output_area, rcti &r_input_area) override; | |||||
| void update_memory_buffer(MemoryBuffer *output, | |||||
| const rcti &area, | |||||
| Span<MemoryBuffer *> inputs) override; | |||||
| }; | }; | ||||
| } // namespace blender::compositor | } // namespace blender::compositor | ||||