Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/compositor/operations/COM_GlareBaseOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_GlareBaseOperation.cpp60
1 files changed, 31 insertions, 29 deletions
diff --git a/source/blender/compositor/operations/COM_GlareBaseOperation.cpp b/source/blender/compositor/operations/COM_GlareBaseOperation.cpp
index 1d98ef65671..593f1eaeefa 100644
--- a/source/blender/compositor/operations/COM_GlareBaseOperation.cpp
+++ b/source/blender/compositor/operations/COM_GlareBaseOperation.cpp
@@ -21,47 +21,49 @@
GlareBaseOperation::GlareBaseOperation() : SingleThreadedOperation()
{
- this->addInputSocket(COM_DT_COLOR);
- this->addOutputSocket(COM_DT_COLOR);
- this->m_settings = NULL;
+ this->addInputSocket(COM_DT_COLOR);
+ this->addOutputSocket(COM_DT_COLOR);
+ this->m_settings = NULL;
}
void GlareBaseOperation::initExecution()
{
- SingleThreadedOperation::initExecution();
- this->m_inputProgram = getInputSocketReader(0);
+ SingleThreadedOperation::initExecution();
+ this->m_inputProgram = getInputSocketReader(0);
}
void GlareBaseOperation::deinitExecution()
{
- this->m_inputProgram = NULL;
- SingleThreadedOperation::deinitExecution();
+ this->m_inputProgram = NULL;
+ SingleThreadedOperation::deinitExecution();
}
MemoryBuffer *GlareBaseOperation::createMemoryBuffer(rcti *rect2)
{
- MemoryBuffer *tile = (MemoryBuffer *)this->m_inputProgram->initializeTileData(rect2);
- rcti rect;
- rect.xmin = 0;
- rect.ymin = 0;
- rect.xmax = getWidth();
- rect.ymax = getHeight();
- MemoryBuffer *result = new MemoryBuffer(COM_DT_COLOR, &rect);
- float *data = result->getBuffer();
- this->generateGlare(data, tile, this->m_settings);
- return result;
+ MemoryBuffer *tile = (MemoryBuffer *)this->m_inputProgram->initializeTileData(rect2);
+ rcti rect;
+ rect.xmin = 0;
+ rect.ymin = 0;
+ rect.xmax = getWidth();
+ rect.ymax = getHeight();
+ MemoryBuffer *result = new MemoryBuffer(COM_DT_COLOR, &rect);
+ float *data = result->getBuffer();
+ this->generateGlare(data, tile, this->m_settings);
+ return result;
}
-bool GlareBaseOperation::determineDependingAreaOfInterest(rcti * /*input*/, ReadBufferOperation *readOperation, rcti *output)
+bool GlareBaseOperation::determineDependingAreaOfInterest(rcti * /*input*/,
+ ReadBufferOperation *readOperation,
+ rcti *output)
{
- if (isCached()) {
- return false;
- }
- else {
- rcti newInput;
- newInput.xmax = this->getWidth();
- newInput.xmin = 0;
- newInput.ymax = this->getHeight();
- newInput.ymin = 0;
- return NodeOperation::determineDependingAreaOfInterest(&newInput, readOperation, output);
- }
+ if (isCached()) {
+ return false;
+ }
+ else {
+ rcti newInput;
+ newInput.xmax = this->getWidth();
+ newInput.xmin = 0;
+ newInput.ymax = this->getHeight();
+ newInput.ymin = 0;
+ return NodeOperation::determineDependingAreaOfInterest(&newInput, readOperation, output);
+ }
}