diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:17:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:21:24 +0300 |
commit | e12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch) | |
tree | 8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/compositor/operations/COM_GlareThresholdOperation.cpp | |
parent | b3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff) |
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'source/blender/compositor/operations/COM_GlareThresholdOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_GlareThresholdOperation.cpp | 50 |
1 files changed, 27 insertions, 23 deletions
diff --git a/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp b/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp index 75e0ce57980..142c51122a1 100644 --- a/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp +++ b/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp @@ -25,43 +25,47 @@ extern "C" { GlareThresholdOperation::GlareThresholdOperation() : NodeOperation() { - this->addInputSocket(COM_DT_COLOR, COM_SC_FIT); - this->addOutputSocket(COM_DT_COLOR); - this->m_inputProgram = NULL; + this->addInputSocket(COM_DT_COLOR, COM_SC_FIT); + this->addOutputSocket(COM_DT_COLOR); + this->m_inputProgram = NULL; } -void GlareThresholdOperation::determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]) +void GlareThresholdOperation::determineResolution(unsigned int resolution[2], + unsigned int preferredResolution[2]) { - NodeOperation::determineResolution(resolution, preferredResolution); - resolution[0] = resolution[0] / (1 << this->m_settings->quality); - resolution[1] = resolution[1] / (1 << this->m_settings->quality); + NodeOperation::determineResolution(resolution, preferredResolution); + resolution[0] = resolution[0] / (1 << this->m_settings->quality); + resolution[1] = resolution[1] / (1 << this->m_settings->quality); } void GlareThresholdOperation::initExecution() { - this->m_inputProgram = this->getInputSocketReader(0); + this->m_inputProgram = this->getInputSocketReader(0); } -void GlareThresholdOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) +void GlareThresholdOperation::executePixelSampled(float output[4], + float x, + float y, + PixelSampler sampler) { - const float threshold = this->m_settings->threshold; + const float threshold = this->m_settings->threshold; - this->m_inputProgram->readSampled(output, x, y, sampler); - if (IMB_colormanagement_get_luminance(output) >= threshold) { - output[0] -= threshold; - output[1] -= threshold; - output[2] -= threshold; + this->m_inputProgram->readSampled(output, x, y, sampler); + if (IMB_colormanagement_get_luminance(output) >= threshold) { + output[0] -= threshold; + output[1] -= threshold; + output[2] -= threshold; - output[0] = max(output[0], 0.0f); - output[1] = max(output[1], 0.0f); - output[2] = max(output[2], 0.0f); - } - else { - zero_v3(output); - } + output[0] = max(output[0], 0.0f); + output[1] = max(output[1], 0.0f); + output[2] = max(output[2], 0.0f); + } + else { + zero_v3(output); + } } void GlareThresholdOperation::deinitExecution() { - this->m_inputProgram = NULL; + this->m_inputProgram = NULL; } |