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-07-08 19:55:58 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-07-08 19:55:58 +0400
commit1bca7fe4927b2517cee02c43464df18144c8637e (patch)
treed99d2322d4940497b52a41d1cbf0a9c02f3a61d0 /source/blender/compositor
parenteab80a40df94b2fedbf0f688248c654e215175f5 (diff)
parent76629c11ae4190b0eec2315360b1ec3379e751c3 (diff)
svn merge ^/trunk/blender -r48691:48729
Diffstat (limited to 'source/blender/compositor')
-rw-r--r--source/blender/compositor/operations/COM_BokehBlurOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_DilateErodeOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp6
3 files changed, 8 insertions, 16 deletions
diff --git a/source/blender/compositor/operations/COM_BokehBlurOperation.cpp b/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
index fb06f6d3761..e83ad4824e4 100644
--- a/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
@@ -160,15 +160,13 @@ bool BokehBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadBuffe
return false;
}
-static cl_kernel kernel = 0;
void BokehBlurOperation::executeOpenCL(OpenCLDevice* device,
MemoryBuffer *outputMemoryBuffer, cl_mem clOutputBuffer,
MemoryBuffer **inputMemoryBuffers, list<cl_mem> *clMemToCleanUp,
list<cl_kernel> *clKernelsToCleanUp)
{
- if (!kernel) {
- kernel = device->COM_clCreateKernel("bokehBlurKernel", NULL);
- }
+ cl_kernel kernel = device->COM_clCreateKernel("bokehBlurKernel", NULL);
+
cl_int radius = this->getWidth() * this->m_size / 100.0f;
cl_int step = this->getStep();
diff --git a/source/blender/compositor/operations/COM_DilateErodeOperation.cpp b/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
index 338a3a0b59b..a9b40f8a6ac 100644
--- a/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
+++ b/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
@@ -234,15 +234,13 @@ bool DilateDistanceOperation::determineDependingAreaOfInterest(rcti *input, Read
return NodeOperation::determineDependingAreaOfInterest(&newInput, readOperation, output);
}
-static cl_kernel dilateKernel = 0;
void DilateDistanceOperation::executeOpenCL(OpenCLDevice* device,
MemoryBuffer *outputMemoryBuffer, cl_mem clOutputBuffer,
MemoryBuffer **inputMemoryBuffers, list<cl_mem> *clMemToCleanUp,
list<cl_kernel> *clKernelsToCleanUp)
{
- if (!dilateKernel) {
- dilateKernel = device->COM_clCreateKernel("dilateKernel", NULL);
- }
+ cl_kernel dilateKernel = device->COM_clCreateKernel("dilateKernel", NULL);
+
cl_int distanceSquared = this->m_distance * this->m_distance;
cl_int scope = this->m_scope;
@@ -293,15 +291,13 @@ void ErodeDistanceOperation::executePixel(float *color, int x, int y, MemoryBuff
color[0] = value;
}
-static cl_kernel erodeKernel = 0;
void ErodeDistanceOperation::executeOpenCL(OpenCLDevice* device,
MemoryBuffer *outputMemoryBuffer, cl_mem clOutputBuffer,
MemoryBuffer **inputMemoryBuffers, list<cl_mem> *clMemToCleanUp,
list<cl_kernel> *clKernelsToCleanUp)
{
- if (!erodeKernel) {
- erodeKernel = device->COM_clCreateKernel("erodeKernel", NULL);
- }
+ cl_kernel erodeKernel = device->COM_clCreateKernel("erodeKernel", NULL);
+
cl_int distanceSquared = this->m_distance * this->m_distance;
cl_int scope = this->m_scope;
diff --git a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
index 7ddcb78b61f..90fd0f04ea4 100644
--- a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
@@ -130,15 +130,13 @@ void VariableSizeBokehBlurOperation::executePixel(float *color, int x, int y, Me
}
-static cl_kernel defocusKernel = 0;
void VariableSizeBokehBlurOperation::executeOpenCL(OpenCLDevice* device,
MemoryBuffer *outputMemoryBuffer, cl_mem clOutputBuffer,
MemoryBuffer **inputMemoryBuffers, list<cl_mem> *clMemToCleanUp,
list<cl_kernel> *clKernelsToCleanUp)
{
- if (!defocusKernel) {
- defocusKernel = device->COM_clCreateKernel("defocusKernel", NULL);
- }
+ cl_kernel defocusKernel = device->COM_clCreateKernel("defocusKernel", NULL);
+
cl_int step = this->getStep();
cl_int maxBlur = this->m_maxBlur;
cl_float threshold = this->m_threshold;