diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2013-11-19 14:06:16 +0400 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2013-11-19 14:06:16 +0400 |
commit | c566e408e42836c136d8818cbea93ce870be09ea (patch) | |
tree | c0b4a027241247558fd5b87786f8e362cb98ef8d /source/blender/compositor/operations/COM_ScaleOperation.cpp | |
parent | 3c662efee33be215092255dd23e4f4f0dc71b502 (diff) |
Cleanup: Renamed compositor executePixel functions and their 'read' wrappers in SocketReader.
Distinguish the 3 different methods for acquiring pixel color values (executePixel, executePixelSampled, executePixelFiltered).
This makes it easier to keep track of the different sampling methods (and works nicer with IDEs that do code parsing).
Differential Revision: http://developer.blender.org/D7
Diffstat (limited to 'source/blender/compositor/operations/COM_ScaleOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_ScaleOperation.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/compositor/operations/COM_ScaleOperation.cpp b/source/blender/compositor/operations/COM_ScaleOperation.cpp index 9e8f5af0ef0..452765a5ab7 100644 --- a/source/blender/compositor/operations/COM_ScaleOperation.cpp +++ b/source/blender/compositor/operations/COM_ScaleOperation.cpp @@ -66,22 +66,22 @@ void ScaleOperation::deinitExecution() } -void ScaleOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ScaleOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { PixelSampler effective_sampler = getEffectiveSampler(sampler); float scaleX[4]; float scaleY[4]; - this->m_inputXOperation->read(scaleX, x, y, effective_sampler); - this->m_inputYOperation->read(scaleY, x, y, effective_sampler); + this->m_inputXOperation->readSampled(scaleX, x, y, effective_sampler); + this->m_inputYOperation->readSampled(scaleY, x, y, effective_sampler); const float scx = scaleX[0]; const float scy = scaleY[0]; float nx = this->m_centerX + (x - this->m_centerX) / scx; float ny = this->m_centerY + (y - this->m_centerY) / scy; - this->m_inputOperation->read(output, nx, ny, effective_sampler); + this->m_inputOperation->readSampled(output, nx, ny, effective_sampler); } bool ScaleOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) @@ -90,8 +90,8 @@ bool ScaleOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOpe float scaleX[4]; float scaleY[4]; - this->m_inputXOperation->read(scaleX, 0, 0, COM_PS_NEAREST); - this->m_inputYOperation->read(scaleY, 0, 0, COM_PS_NEAREST); + this->m_inputXOperation->readSampled(scaleX, 0, 0, COM_PS_NEAREST); + this->m_inputYOperation->readSampled(scaleY, 0, 0, COM_PS_NEAREST); const float scx = scaleX[0]; const float scy = scaleY[0]; @@ -134,15 +134,15 @@ void ScaleAbsoluteOperation::deinitExecution() } -void ScaleAbsoluteOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ScaleAbsoluteOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { PixelSampler effective_sampler = getEffectiveSampler(sampler); float scaleX[4]; float scaleY[4]; - this->m_inputXOperation->read(scaleX, x, y, effective_sampler); - this->m_inputYOperation->read(scaleY, x, y, effective_sampler); + this->m_inputXOperation->readSampled(scaleX, x, y, effective_sampler); + this->m_inputYOperation->readSampled(scaleY, x, y, effective_sampler); const float scx = scaleX[0]; // target absolute scale const float scy = scaleY[0]; // target absolute scale @@ -156,7 +156,7 @@ void ScaleAbsoluteOperation::executePixel(float output[4], float x, float y, Pix float nx = this->m_centerX + (x - this->m_centerX) / relativeXScale; float ny = this->m_centerY + (y - this->m_centerY) / relativeYScale; - this->m_inputOperation->read(output, nx, ny, effective_sampler); + this->m_inputOperation->readSampled(output, nx, ny, effective_sampler); } bool ScaleAbsoluteOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) @@ -165,8 +165,8 @@ bool ScaleAbsoluteOperation::determineDependingAreaOfInterest(rcti *input, ReadB float scaleX[4]; float scaleY[4]; - this->m_inputXOperation->read(scaleX, 0, 0, COM_PS_NEAREST); - this->m_inputYOperation->read(scaleY, 0, 0, COM_PS_NEAREST); + this->m_inputXOperation->readSampled(scaleX, 0, 0, COM_PS_NEAREST); + this->m_inputYOperation->readSampled(scaleY, 0, 0, COM_PS_NEAREST); const float scx = scaleX[0]; const float scy = scaleY[0]; @@ -253,17 +253,17 @@ void ScaleFixedSizeOperation::deinitExecution() } -void ScaleFixedSizeOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void ScaleFixedSizeOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { PixelSampler effective_sampler = getEffectiveSampler(sampler); if (this->m_is_offset) { float nx = ((x - this->m_offsetX) * this->m_relX); float ny = ((y - this->m_offsetY) * this->m_relY); - this->m_inputOperation->read(output, nx, ny, effective_sampler); + this->m_inputOperation->readSampled(output, nx, ny, effective_sampler); } else { - this->m_inputOperation->read(output, x * this->m_relX, y * this->m_relY, effective_sampler); + this->m_inputOperation->readSampled(output, x * this->m_relX, y * this->m_relY, effective_sampler); } } |