From 7862b2fa13c0437d9c17eae78e7b79a421dacf05 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 17 May 2012 22:55:28 +0000 Subject: style cleanup: compositor, pointer syntax, function brace placement, line length --- .../operations/COM_ColorCurveOperation.cpp | 30 ++++++++++++---------- 1 file changed, 17 insertions(+), 13 deletions(-) (limited to 'source/blender/compositor/operations/COM_ColorCurveOperation.cpp') diff --git a/source/blender/compositor/operations/COM_ColorCurveOperation.cpp b/source/blender/compositor/operations/COM_ColorCurveOperation.cpp index 375d7269124..8aee54013b1 100644 --- a/source/blender/compositor/operations/COM_ColorCurveOperation.cpp +++ b/source/blender/compositor/operations/COM_ColorCurveOperation.cpp @@ -30,7 +30,8 @@ extern "C" { } #endif -ColorCurveOperation::ColorCurveOperation(): CurveBaseOperation() { +ColorCurveOperation::ColorCurveOperation(): CurveBaseOperation() +{ this->addInputSocket(COM_DT_VALUE); this->addInputSocket(COM_DT_COLOR); this->addInputSocket(COM_DT_COLOR); @@ -44,7 +45,8 @@ ColorCurveOperation::ColorCurveOperation(): CurveBaseOperation() { this->setResolutionInputSocketIndex(1); } -void ColorCurveOperation::initExecution() { +void ColorCurveOperation::initExecution() +{ CurveBaseOperation::initExecution(); this->inputFacProgram = this->getInputSocketReader(0); this->inputImageProgram = this->getInputSocketReader(1); @@ -55,7 +57,8 @@ void ColorCurveOperation::initExecution() { } -void ColorCurveOperation::executePixel(float* color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) { +void ColorCurveOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) +{ float black[4]; float white[4]; float fac[4]; @@ -69,24 +72,25 @@ void ColorCurveOperation::executePixel(float* color, float x, float y, PixelSamp this->inputFacProgram->read(fac, x, y, sampler, inputBuffers); this->inputImageProgram->read(image, x, y, sampler, inputBuffers); - if (fac[0]>=1.0) + if (fac[0] >= 1.0) curvemapping_evaluate_premulRGBF(this->curveMapping, color, image); else if (*fac<=0.0) { - color[0]= image[0]; - color[1]= image[1]; - color[2]= image[2]; + color[0] = image[0]; + color[1] = image[1]; + color[2] = image[2]; } else { - float col[4], mfac= 1.0f-*fac; + float col[4], mfac = 1.0f-*fac; curvemapping_evaluate_premulRGBF(this->curveMapping, col, image); - color[0]= mfac*image[0] + *fac*col[0]; - color[1]= mfac*image[1] + *fac*col[1]; - color[2]= mfac*image[2] + *fac*col[2]; + color[0] = mfac*image[0] + *fac*col[0]; + color[1] = mfac*image[1] + *fac*col[1]; + color[2] = mfac*image[2] + *fac*col[2]; } - color[3]= image[3]; + color[3] = image[3]; } -void ColorCurveOperation::deinitExecution() { +void ColorCurveOperation::deinitExecution() +{ this->inputFacProgram = NULL; this->inputImageProgram = NULL; this->inputBlackProgram = NULL; -- cgit v1.2.3