diff options
Diffstat (limited to 'source/blender/compositor/intern')
-rw-r--r-- | source/blender/compositor/intern/COM_MemoryBuffer.cc | 6 | ||||
-rw-r--r-- | source/blender/compositor/intern/COM_MemoryBuffer.h | 10 | ||||
-rw-r--r-- | source/blender/compositor/intern/COM_OpenCLDevice.cc | 4 |
3 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/compositor/intern/COM_MemoryBuffer.cc b/source/blender/compositor/intern/COM_MemoryBuffer.cc index d69fe238e61..46c99623244 100644 --- a/source/blender/compositor/intern/COM_MemoryBuffer.cc +++ b/source/blender/compositor/intern/COM_MemoryBuffer.cc @@ -47,7 +47,7 @@ int MemoryBuffer::getHeight() const return this->m_height; } -MemoryBuffer::MemoryBuffer(MemoryProxy *memoryProxy, unsigned int chunkNumber, rcti &rect) +MemoryBuffer::MemoryBuffer(MemoryProxy *memoryProxy, unsigned int chunkNumber, const rcti &rect) { m_rect = rect; this->m_width = BLI_rcti_size_x(&this->m_rect); @@ -61,7 +61,7 @@ MemoryBuffer::MemoryBuffer(MemoryProxy *memoryProxy, unsigned int chunkNumber, r this->m_datatype = memoryProxy->getDataType(); } -MemoryBuffer::MemoryBuffer(MemoryProxy *memoryProxy, rcti &rect) +MemoryBuffer::MemoryBuffer(MemoryProxy *memoryProxy, const rcti &rect) { m_rect = rect; this->m_width = BLI_rcti_size_x(&this->m_rect); @@ -74,7 +74,7 @@ MemoryBuffer::MemoryBuffer(MemoryProxy *memoryProxy, rcti &rect) this->m_state = COM_MB_TEMPORARILY; this->m_datatype = memoryProxy->getDataType(); } -MemoryBuffer::MemoryBuffer(DataType dataType, rcti &rect) +MemoryBuffer::MemoryBuffer(DataType dataType, const rcti &rect) { m_rect = rect; this->m_width = BLI_rcti_size_x(&this->m_rect); diff --git a/source/blender/compositor/intern/COM_MemoryBuffer.h b/source/blender/compositor/intern/COM_MemoryBuffer.h index 3242f4a3d75..b80124ca136 100644 --- a/source/blender/compositor/intern/COM_MemoryBuffer.h +++ b/source/blender/compositor/intern/COM_MemoryBuffer.h @@ -98,17 +98,17 @@ class MemoryBuffer { /** * \brief construct new MemoryBuffer for a chunk */ - MemoryBuffer(MemoryProxy *memoryProxy, unsigned int chunkNumber, rcti &rect); + MemoryBuffer(MemoryProxy *memoryProxy, unsigned int chunkNumber, const rcti &rect); /** * \brief construct new temporarily MemoryBuffer for an area */ - MemoryBuffer(MemoryProxy *memoryProxy, rcti &rect); + MemoryBuffer(MemoryProxy *memoryProxy, const rcti &rect); /** * \brief construct new temporarily MemoryBuffer for an area */ - MemoryBuffer(DataType datatype, rcti &rect); + MemoryBuffer(DataType datatype, const rcti &rect); /** * \brief destructor @@ -319,9 +319,9 @@ class MemoryBuffer { /** * \brief get the rect of this MemoryBuffer */ - rcti *getRect() + const rcti &get_rect() const { - return &this->m_rect; + return this->m_rect; } /** diff --git a/source/blender/compositor/intern/COM_OpenCLDevice.cc b/source/blender/compositor/intern/COM_OpenCLDevice.cc index 838376d2e63..d5aed2052ac 100644 --- a/source/blender/compositor/intern/COM_OpenCLDevice.cc +++ b/source/blender/compositor/intern/COM_OpenCLDevice.cc @@ -152,8 +152,8 @@ void OpenCLDevice::COM_clAttachMemoryBufferOffsetToKernelParameter(cl_kernel ker { if (offsetIndex != -1) { cl_int error; - rcti *rect = memoryBuffer->getRect(); - cl_int2 offset = {{rect->xmin, rect->ymin}}; + const rcti &rect = memoryBuffer->get_rect(); + cl_int2 offset = {{rect.xmin, rect.ymin}}; error = clSetKernelArg(kernel, offsetIndex, sizeof(cl_int2), &offset); if (error != CL_SUCCESS) { |