diff options
author | Manuel Castilla <manzanillawork@gmail.com> | 2021-10-14 00:00:50 +0300 |
---|---|---|
committer | Manuel Castilla <manzanillawork@gmail.com> | 2021-10-14 00:41:14 +0300 |
commit | ea79efef70da14100b591b50dcada819808f20b6 (patch) | |
tree | 4faf296870f1ab27ee33fee2b331fdb6b2d2bec4 /source/blender/compositor/operations/COM_ImageOperation.cc | |
parent | ecb8a574c752068de9f8d9eb98f54db1569df2f7 (diff) |
Cleanup: remove `this->` for `m_` prefixed members in Compositor
For cleaning old code style as new code usually omit it.
Diffstat (limited to 'source/blender/compositor/operations/COM_ImageOperation.cc')
-rw-r--r-- | source/blender/compositor/operations/COM_ImageOperation.cc | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/source/blender/compositor/operations/COM_ImageOperation.cc b/source/blender/compositor/operations/COM_ImageOperation.cc index 773b61bc225..6c4f860df1a 100644 --- a/source/blender/compositor/operations/COM_ImageOperation.cc +++ b/source/blender/compositor/operations/COM_ImageOperation.cc @@ -28,19 +28,19 @@ namespace blender::compositor { BaseImageOperation::BaseImageOperation() { - this->m_image = nullptr; - this->m_buffer = nullptr; - this->m_imageFloatBuffer = nullptr; - this->m_imageByteBuffer = nullptr; - this->m_imageUser = nullptr; - this->m_imagewidth = 0; - this->m_imageheight = 0; - this->m_framenumber = 0; - this->m_depthBuffer = nullptr; + m_image = nullptr; + m_buffer = nullptr; + m_imageFloatBuffer = nullptr; + m_imageByteBuffer = nullptr; + m_imageUser = nullptr; + m_imagewidth = 0; + m_imageheight = 0; + m_framenumber = 0; + m_depthBuffer = nullptr; depth_buffer_ = nullptr; - this->m_numberOfChannels = 0; - this->m_rd = nullptr; - this->m_viewName = nullptr; + m_numberOfChannels = 0; + m_rd = nullptr; + m_viewName = nullptr; } ImageOperation::ImageOperation() : BaseImageOperation() { @@ -58,20 +58,20 @@ ImageDepthOperation::ImageDepthOperation() : BaseImageOperation() ImBuf *BaseImageOperation::getImBuf() { ImBuf *ibuf; - ImageUser iuser = *this->m_imageUser; + ImageUser iuser = *m_imageUser; - if (this->m_image == nullptr) { + if (m_image == nullptr) { return nullptr; } /* local changes to the original ImageUser */ - if (BKE_image_is_multilayer(this->m_image) == false) { - iuser.multi_index = BKE_scene_multiview_view_id_get(this->m_rd, this->m_viewName); + if (BKE_image_is_multilayer(m_image) == false) { + iuser.multi_index = BKE_scene_multiview_view_id_get(m_rd, m_viewName); } - ibuf = BKE_image_acquire_ibuf(this->m_image, &iuser, nullptr); + ibuf = BKE_image_acquire_ibuf(m_image, &iuser, nullptr); if (ibuf == nullptr || (ibuf->rect == nullptr && ibuf->rect_float == nullptr)) { - BKE_image_release_ibuf(this->m_image, ibuf, nullptr); + BKE_image_release_ibuf(m_image, ibuf, nullptr); return nullptr; } return ibuf; @@ -80,25 +80,25 @@ ImBuf *BaseImageOperation::getImBuf() void BaseImageOperation::initExecution() { ImBuf *stackbuf = getImBuf(); - this->m_buffer = stackbuf; + m_buffer = stackbuf; if (stackbuf) { - this->m_imageFloatBuffer = stackbuf->rect_float; - this->m_imageByteBuffer = stackbuf->rect; - this->m_depthBuffer = stackbuf->zbuf_float; + m_imageFloatBuffer = stackbuf->rect_float; + m_imageByteBuffer = stackbuf->rect; + m_depthBuffer = stackbuf->zbuf_float; if (stackbuf->zbuf_float) { depth_buffer_ = new MemoryBuffer(stackbuf->zbuf_float, 1, stackbuf->x, stackbuf->y); } - this->m_imagewidth = stackbuf->x; - this->m_imageheight = stackbuf->y; - this->m_numberOfChannels = stackbuf->channels; + m_imagewidth = stackbuf->x; + m_imageheight = stackbuf->y; + m_numberOfChannels = stackbuf->channels; } } void BaseImageOperation::deinitExecution() { - this->m_imageFloatBuffer = nullptr; - this->m_imageByteBuffer = nullptr; - BKE_image_release_ibuf(this->m_image, this->m_buffer, nullptr); + m_imageFloatBuffer = nullptr; + m_imageByteBuffer = nullptr; + BKE_image_release_ibuf(m_image, m_buffer, nullptr); if (depth_buffer_) { delete depth_buffer_; depth_buffer_ = nullptr; @@ -115,7 +115,7 @@ void BaseImageOperation::determine_canvas(const rcti &UNUSED(preferred_area), rc BLI_rcti_init(&r_area, 0, stackbuf->x, 0, stackbuf->y); } - BKE_image_release_ibuf(this->m_image, stackbuf, nullptr); + BKE_image_release_ibuf(m_image, stackbuf, nullptr); } static void sampleImageAtLocation( @@ -157,14 +157,14 @@ static void sampleImageAtLocation( void ImageOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { int ix = x, iy = y; - if (this->m_imageFloatBuffer == nullptr && this->m_imageByteBuffer == nullptr) { + if (m_imageFloatBuffer == nullptr && m_imageByteBuffer == nullptr) { zero_v4(output); } - else if (ix < 0 || iy < 0 || ix >= this->m_buffer->x || iy >= this->m_buffer->y) { + else if (ix < 0 || iy < 0 || ix >= m_buffer->x || iy >= m_buffer->y) { zero_v4(output); } else { - sampleImageAtLocation(this->m_buffer, x, y, sampler, true, output); + sampleImageAtLocation(m_buffer, x, y, sampler, true, output); } } @@ -182,12 +182,12 @@ void ImageAlphaOperation::executePixelSampled(float output[4], { float tempcolor[4]; - if (this->m_imageFloatBuffer == nullptr && this->m_imageByteBuffer == nullptr) { + if (m_imageFloatBuffer == nullptr && m_imageByteBuffer == nullptr) { output[0] = 0.0f; } else { tempcolor[3] = 1.0f; - sampleImageAtLocation(this->m_buffer, x, y, sampler, false, tempcolor); + sampleImageAtLocation(m_buffer, x, y, sampler, false, tempcolor); output[0] = tempcolor[3]; } } @@ -204,7 +204,7 @@ void ImageDepthOperation::executePixelSampled(float output[4], float y, PixelSampler /*sampler*/) { - if (this->m_depthBuffer == nullptr) { + if (m_depthBuffer == nullptr) { output[0] = 0.0f; } else { @@ -213,7 +213,7 @@ void ImageDepthOperation::executePixelSampled(float output[4], } else { int offset = y * getWidth() + x; - output[0] = this->m_depthBuffer[offset]; + output[0] = m_depthBuffer[offset]; } } } |