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:
authorCampbell Barton <ideasman42@gmail.com>2012-06-25 22:01:01 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-25 22:01:01 +0400
commitfa0c5a100da6afe58462709f2b3acf0f870112cb (patch)
tree498ceeac763d72dac8b39f86c823188f79c9cd4d /source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp
parent6badc77cb0de84286db9b0df365ff4e2c85ec7b9 (diff)
fix for crash with blur - happened most when there was a size input, need to mutex lock before allocating the gauss array.
also add suspiciously missing call to BlurBaseOperation::initExecution, X had but Y was missing.
Diffstat (limited to 'source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp
index e1105cf94b1..ef5f9d5c31b 100644
--- a/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp
@@ -36,10 +36,12 @@ GaussianAlphaYBlurOperation::GaussianAlphaYBlurOperation() : BlurBaseOperation(C
void *GaussianAlphaYBlurOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuffers)
{
+ lockMutex();
if (!this->sizeavailable) {
updateGauss(memoryBuffers);
}
void *buffer = getInputOperation(0)->initializeTileData(NULL, memoryBuffers);
+ unlockMutex();
return buffer;
}
@@ -47,6 +49,8 @@ void GaussianAlphaYBlurOperation::initExecution()
{
/* BlurBaseOperation::initExecution(); */ /* until we suppoer size input - comment this */
+ initMutex();
+
if (this->sizeavailable) {
float rad = size * this->data->sizey;
if (rad < 1)
@@ -65,7 +69,7 @@ void GaussianAlphaYBlurOperation::updateGauss(MemoryBuffer **memoryBuffers)
float rad = size * this->data->sizey;
if (rad < 1)
rad = 1;
-
+
this->rad = rad;
this->gausstab = BlurBaseOperation::make_gausstab(rad);
}
@@ -154,6 +158,8 @@ void GaussianAlphaYBlurOperation::deinitExecution()
this->gausstab = NULL;
delete [] this->distbuf_inv;
this->distbuf_inv = NULL;
+
+ deinitMutex();
}
bool GaussianAlphaYBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)