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:
authorJeroen Bakker <j.bakker@atmind.nl>2012-07-02 19:26:47 +0400
committerJeroen Bakker <j.bakker@atmind.nl>2012-07-02 19:26:47 +0400
commitea5e0d0212c982e0b440d19124a991e1d467177e (patch)
treeb515b12849b31b1db19c39b0981d3c7c05fc53ca /source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
parenta0c6371b7f526905bb06e6f099f8b6f8bb743c01 (diff)
Limit out of screen tiles to be scheduled.
Diffstat (limited to 'source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
index 50bac63d6f2..74145c52a5d 100644
--- a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
+++ b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
@@ -36,6 +36,7 @@ ProjectorLensDistortionOperation::ProjectorLensDistortionOperation() : NodeOpera
}
void ProjectorLensDistortionOperation::initExecution()
{
+ this->initMutex();
this->m_inputProgram = this->getInputSocketReader(0);
}
@@ -65,6 +66,7 @@ void ProjectorLensDistortionOperation::executePixel(float *color, int x, int y,
void ProjectorLensDistortionOperation::deinitExecution()
{
+ this->deinitMutex();
this->m_inputProgram = NULL;
}
@@ -77,16 +79,18 @@ bool ProjectorLensDistortionOperation::determineDependingAreaOfInterest(rcti *in
newInput.xmin = input->xmin - this->m_kr2 - 2;
newInput.xmax = input->xmax + this->m_kr2 + 2;
} else {
- newInput.xmin = 0;
+ newInput.xmin = input->xmin-7; //(0.25f*20*1)+2 == worse case dispersion
newInput.ymin = input->ymin;
newInput.ymax = input->ymax;
- newInput.xmax = this->m_inputProgram->getWidth();
+ newInput.xmax = input->xmax+7; //(0.25f*20*1)+2 == worse case dispersion
}
return NodeOperation::determineDependingAreaOfInterest(&newInput, readOperation, output);
}
void ProjectorLensDistortionOperation::updateDispersion(MemoryBuffer **inputBuffers)
{
+ if (this->m_dispersionAvailable) return;
+ this->lockMutex();
if (!this->m_dispersionAvailable) {
float result[4];
this->getInputSocketReader(1)->read(result, 0, 0, COM_PS_NEAREST, inputBuffers);
@@ -95,4 +99,5 @@ void ProjectorLensDistortionOperation::updateDispersion(MemoryBuffer **inputBuff
this->m_kr2 = this->m_kr * 20;
this->m_dispersionAvailable = true;
}
+ this->unlockMutex();
}