Changeset View
Changeset View
Standalone View
Standalone View
source/blender/compositor/intern/COM_FullFrameBufferedOperation.h
- This file was copied from source/blender/compositor/intern/COM_SingleThreadedOperation.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_FullFrameOperation.h" | ||||
| #include "COM_WriteBufferOperation.h" | |||||
| namespace blender::compositor { | namespace blender::compositor { | ||||
| class SingleThreadedOperation : public NodeOperation { | class FullFrameBufferedOperation : public WriteBufferOperation, FullFrameOperation { | ||||
| private: | |||||
| MemoryBuffer *m_cachedInstance; | |||||
| protected: | |||||
| inline bool isCached() | |||||
| { | |||||
| return this->m_cachedInstance != nullptr; | |||||
| } | |||||
| public: | public: | ||||
| SingleThreadedOperation(); | FullFrameBufferedOperation(DataType data_type); | ||||
| /** | |||||
| * The inner loop of this operation. | |||||
| */ | |||||
| void executePixel(float output[4], int x, int y, void *data) override; | |||||
| /** | |||||
| * Initialize the execution | |||||
| */ | |||||
| void initExecution() override; | |||||
| /** | |||||
| * Deinitialize the execution | |||||
| */ | |||||
| void deinitExecution() override; | |||||
| void *initializeTileData(rcti *rect) override; | |||||
| virtual MemoryBuffer *createMemoryBuffer(rcti *rect) = 0; | void executeRegion(rcti *rect, unsigned int tile_number) override; | ||||
| }; | }; | ||||
| } // namespace blender::compositor | } // namespace blender::compositor | ||||