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_CompositorOperation.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_CompositorOperation.cc')
-rw-r--r-- | source/blender/compositor/operations/COM_CompositorOperation.cc | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/source/blender/compositor/operations/COM_CompositorOperation.cc b/source/blender/compositor/operations/COM_CompositorOperation.cc index 0713ecd9316..481aca1a68b 100644 --- a/source/blender/compositor/operations/COM_CompositorOperation.cc +++ b/source/blender/compositor/operations/COM_CompositorOperation.cc @@ -32,71 +32,71 @@ CompositorOperation::CompositorOperation() this->addInputSocket(DataType::Value); this->setRenderData(nullptr); - this->m_outputBuffer = nullptr; - this->m_depthBuffer = nullptr; - this->m_imageInput = nullptr; - this->m_alphaInput = nullptr; - this->m_depthInput = nullptr; + m_outputBuffer = nullptr; + m_depthBuffer = nullptr; + m_imageInput = nullptr; + m_alphaInput = nullptr; + m_depthInput = nullptr; - this->m_useAlphaInput = false; - this->m_active = false; + m_useAlphaInput = false; + m_active = false; - this->m_scene = nullptr; - this->m_sceneName[0] = '\0'; - this->m_viewName = nullptr; + m_scene = nullptr; + m_sceneName[0] = '\0'; + m_viewName = nullptr; flags.use_render_border = true; } void CompositorOperation::initExecution() { - if (!this->m_active) { + if (!m_active) { return; } /* When initializing the tree during initial load the width and height can be zero. */ - this->m_imageInput = getInputSocketReader(0); - this->m_alphaInput = getInputSocketReader(1); - this->m_depthInput = getInputSocketReader(2); + m_imageInput = getInputSocketReader(0); + m_alphaInput = getInputSocketReader(1); + m_depthInput = getInputSocketReader(2); if (this->getWidth() * this->getHeight() != 0) { - this->m_outputBuffer = (float *)MEM_callocN( - sizeof(float[4]) * this->getWidth() * this->getHeight(), "CompositorOperation"); + m_outputBuffer = (float *)MEM_callocN(sizeof(float[4]) * this->getWidth() * this->getHeight(), + "CompositorOperation"); } - if (this->m_depthInput != nullptr) { - this->m_depthBuffer = (float *)MEM_callocN( - sizeof(float) * this->getWidth() * this->getHeight(), "CompositorOperation"); + if (m_depthInput != nullptr) { + m_depthBuffer = (float *)MEM_callocN(sizeof(float) * this->getWidth() * this->getHeight(), + "CompositorOperation"); } } void CompositorOperation::deinitExecution() { - if (!this->m_active) { + if (!m_active) { return; } if (!isBraked()) { - Render *re = RE_GetSceneRender(this->m_scene); + Render *re = RE_GetSceneRender(m_scene); RenderResult *rr = RE_AcquireResultWrite(re); if (rr) { - RenderView *rv = RE_RenderViewGetByName(rr, this->m_viewName); + RenderView *rv = RE_RenderViewGetByName(rr, m_viewName); if (rv->rectf != nullptr) { MEM_freeN(rv->rectf); } - rv->rectf = this->m_outputBuffer; + rv->rectf = m_outputBuffer; if (rv->rectz != nullptr) { MEM_freeN(rv->rectz); } - rv->rectz = this->m_depthBuffer; + rv->rectz = m_depthBuffer; rr->have_combined = true; } else { - if (this->m_outputBuffer) { - MEM_freeN(this->m_outputBuffer); + if (m_outputBuffer) { + MEM_freeN(m_outputBuffer); } - if (this->m_depthBuffer) { - MEM_freeN(this->m_depthBuffer); + if (m_depthBuffer) { + MEM_freeN(m_depthBuffer); } } @@ -113,26 +113,26 @@ void CompositorOperation::deinitExecution() BLI_thread_unlock(LOCK_DRAW_IMAGE); } else { - if (this->m_outputBuffer) { - MEM_freeN(this->m_outputBuffer); + if (m_outputBuffer) { + MEM_freeN(m_outputBuffer); } - if (this->m_depthBuffer) { - MEM_freeN(this->m_depthBuffer); + if (m_depthBuffer) { + MEM_freeN(m_depthBuffer); } } - this->m_outputBuffer = nullptr; - this->m_depthBuffer = nullptr; - this->m_imageInput = nullptr; - this->m_alphaInput = nullptr; - this->m_depthInput = nullptr; + m_outputBuffer = nullptr; + m_depthBuffer = nullptr; + m_imageInput = nullptr; + m_alphaInput = nullptr; + m_depthInput = nullptr; } void CompositorOperation::executeRegion(rcti *rect, unsigned int /*tileNumber*/) { float color[8]; // 7 is enough - float *buffer = this->m_outputBuffer; - float *zbuffer = this->m_depthBuffer; + float *buffer = m_outputBuffer; + float *zbuffer = m_depthBuffer; if (!buffer) { return; @@ -150,7 +150,7 @@ void CompositorOperation::executeRegion(rcti *rect, unsigned int /*tileNumber*/) int dx = 0, dy = 0; #if 0 - const RenderData *rd = this->m_rd; + const RenderData *rd = m_rd; if (rd->mode & R_BORDER && rd->mode & R_CROP) { /** @@ -192,14 +192,14 @@ void CompositorOperation::executeRegion(rcti *rect, unsigned int /*tileNumber*/) for (x = x1; x < x2 && (!breaked); x++) { int input_x = x + dx, input_y = y + dy; - this->m_imageInput->readSampled(color, input_x, input_y, PixelSampler::Nearest); - if (this->m_useAlphaInput) { - this->m_alphaInput->readSampled(&(color[3]), input_x, input_y, PixelSampler::Nearest); + m_imageInput->readSampled(color, input_x, input_y, PixelSampler::Nearest); + if (m_useAlphaInput) { + m_alphaInput->readSampled(&(color[3]), input_x, input_y, PixelSampler::Nearest); } copy_v4_v4(buffer + offset4, color); - this->m_depthInput->readSampled(color, input_x, input_y, PixelSampler::Nearest); + m_depthInput->readSampled(color, input_x, input_y, PixelSampler::Nearest); zbuffer[offset] = color[0]; offset4 += COM_DATA_TYPE_COLOR_CHANNELS; offset++; @@ -221,7 +221,7 @@ void CompositorOperation::update_memory_buffer_partial(MemoryBuffer *UNUSED(outp } MemoryBuffer output_buf(m_outputBuffer, COM_DATA_TYPE_COLOR_CHANNELS, getWidth(), getHeight()); output_buf.copy_from(inputs[0], area); - if (this->m_useAlphaInput) { + if (m_useAlphaInput) { output_buf.copy_from(inputs[1], area, 0, COM_DATA_TYPE_VALUE_CHANNELS, 3); } MemoryBuffer depth_buf(m_depthBuffer, COM_DATA_TYPE_VALUE_CHANNELS, getWidth(), getHeight()); @@ -230,12 +230,12 @@ void CompositorOperation::update_memory_buffer_partial(MemoryBuffer *UNUSED(outp void CompositorOperation::determine_canvas(const rcti &UNUSED(preferred_area), rcti &r_area) { - int width = this->m_rd->xsch * this->m_rd->size / 100; - int height = this->m_rd->ysch * this->m_rd->size / 100; + int width = m_rd->xsch * m_rd->size / 100; + int height = m_rd->ysch * m_rd->size / 100; /* Check actual render resolution with cropping it may differ with cropped border.rendering * Fix for T31777 Border Crop gives black (easy). */ - Render *re = RE_GetSceneRender(this->m_scene); + Render *re = RE_GetSceneRender(m_scene); if (re) { RenderResult *rr = RE_AcquireResultRead(re); if (rr) { |