diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-18 02:55:28 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-18 02:55:28 +0400 |
commit | 7862b2fa13c0437d9c17eae78e7b79a421dacf05 (patch) | |
tree | 08f9c26af3e71795d0f65803a415b5612d6b53ab /source/blender/compositor/operations/COM_GammaCorrectOperation.cpp | |
parent | 69b95e1a8a00c9ff146d803b8ec11183d7a68908 (diff) |
style cleanup: compositor, pointer syntax, function brace placement, line length
Diffstat (limited to 'source/blender/compositor/operations/COM_GammaCorrectOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_GammaCorrectOperation.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/source/blender/compositor/operations/COM_GammaCorrectOperation.cpp b/source/blender/compositor/operations/COM_GammaCorrectOperation.cpp index c83c5d0ecb6..a4fb20402a4 100644 --- a/source/blender/compositor/operations/COM_GammaCorrectOperation.cpp +++ b/source/blender/compositor/operations/COM_GammaCorrectOperation.cpp @@ -23,16 +23,19 @@ #include "COM_GammaCorrectOperation.h" #include "BLI_math.h" -GammaCorrectOperation::GammaCorrectOperation(): NodeOperation() { +GammaCorrectOperation::GammaCorrectOperation(): NodeOperation() +{ this->addInputSocket(COM_DT_COLOR); this->addOutputSocket(COM_DT_COLOR); this->inputProgram = NULL; } -void GammaCorrectOperation::initExecution() { +void GammaCorrectOperation::initExecution() +{ this->inputProgram = this->getInputSocketReader(0); } -void GammaCorrectOperation::executePixel(float* color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) { +void GammaCorrectOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) +{ float inputColor[4]; this->inputProgram->read(inputColor, x, y, sampler, inputBuffers); if (inputColor[3] > 0.0f) { @@ -56,20 +59,24 @@ void GammaCorrectOperation::executePixel(float* color, float x, float y, PixelSa color[3] = inputColor[3]; } -void GammaCorrectOperation::deinitExecution() { +void GammaCorrectOperation::deinitExecution() +{ this->inputProgram = NULL; } -GammaUncorrectOperation::GammaUncorrectOperation(): NodeOperation() { +GammaUncorrectOperation::GammaUncorrectOperation(): NodeOperation() +{ this->addInputSocket(COM_DT_COLOR); this->addOutputSocket(COM_DT_COLOR); this->inputProgram = NULL; } -void GammaUncorrectOperation::initExecution() { +void GammaUncorrectOperation::initExecution() +{ this->inputProgram = this->getInputSocketReader(0); } -void GammaUncorrectOperation::executePixel(float* color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) { +void GammaUncorrectOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) +{ float inputColor[4]; this->inputProgram->read(inputColor, x, y, sampler, inputBuffers); @@ -93,6 +100,7 @@ void GammaUncorrectOperation::executePixel(float* color, float x, float y, Pixel color[3] = inputColor[3]; } -void GammaUncorrectOperation::deinitExecution() { +void GammaUncorrectOperation::deinitExecution() +{ this->inputProgram = NULL; } |