From e12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 17 Apr 2019 06:17:24 +0200 Subject: 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 --- .../operations/COM_GlareThresholdOperation.cpp | 50 ++++++++++++---------- 1 file changed, 27 insertions(+), 23 deletions(-) (limited to 'source/blender/compositor/operations/COM_GlareThresholdOperation.cpp') 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; } -- cgit v1.2.3