Changeset View
Changeset View
Standalone View
Standalone View
source/blender/compositor/intern/COM_FullFrameBufferedOperation.cc
- This file was copied from source/blender/compositor/intern/COM_SingleThreadedOperation.h.
| Show All 10 Lines | |||||
| * | * | ||||
| * You should have received a copy of the GNU General Public License | * You should have received a copy of the GNU General Public License | ||||
| * 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 | #include "COM_FullFrameBufferedOperation.h" | ||||
| #include "COM_NodeOperation.h" | |||||
| namespace blender::compositor { | namespace blender::compositor { | ||||
| class SingleThreadedOperation : public NodeOperation { | FullFrameBufferedOperation::FullFrameBufferedOperation(DataType data_type) | ||||
| private: | : WriteBufferOperation(data_type, false) | ||||
| MemoryBuffer *m_cachedInstance; | |||||
| protected: | |||||
| inline bool isCached() | |||||
| { | { | ||||
| return this->m_cachedInstance != nullptr; | flags.complex = true; | ||||
| flags.write_partial_buffer = true; | |||||
| } | } | ||||
| public: | void FullFrameBufferedOperation::executeRegion(rcti *rect, unsigned int UNUSED(tile_number)) | ||||
| SingleThreadedOperation(); | { | ||||
| execute_write_buffer_region(this, rect); | |||||
| /** | } | ||||
| * 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; | |||||
| }; | |||||
| } // namespace blender::compositor | } // namespace blender::compositor | ||||