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-08-21 19:14:29 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-21 19:14:29 +0400
commit3090ae35afe478435a77be6a9c1be913fe406242 (patch)
tree598e1d42ff89a6cc99355a1e34e0f053bb3d786e /source/blender/compositor/operations
parent857a3cd1120c402e22928e7d43612a9fee72a80d (diff)
fix [#32374] Curve compositor UI drawing glitch
copy the curve for the compositor.
Diffstat (limited to 'source/blender/compositor/operations')
-rw-r--r--source/blender/compositor/operations/COM_ColorCurveOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_CurveBaseOperation.cpp14
-rw-r--r--source/blender/compositor/operations/COM_CurveBaseOperation.h3
-rw-r--r--source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp1
-rw-r--r--source/blender/compositor/operations/COM_VectorCurveOperation.cpp1
5 files changed, 20 insertions, 3 deletions
diff --git a/source/blender/compositor/operations/COM_ColorCurveOperation.cpp b/source/blender/compositor/operations/COM_ColorCurveOperation.cpp
index 81205514040..2f13a90c072 100644
--- a/source/blender/compositor/operations/COM_ColorCurveOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorCurveOperation.cpp
@@ -98,11 +98,11 @@ void ColorCurveOperation::executePixel(float output[4], float x, float y, PixelS
void ColorCurveOperation::deinitExecution()
{
+ CurveBaseOperation::deinitExecution();
this->m_inputFacProgram = NULL;
this->m_inputImageProgram = NULL;
this->m_inputBlackProgram = NULL;
this->m_inputWhiteProgram = NULL;
- curvemapping_premultiply(this->m_curveMapping, 1);
}
@@ -154,7 +154,7 @@ void ConstantLevelColorCurveOperation::executePixel(float output[4], float x, fl
void ConstantLevelColorCurveOperation::deinitExecution()
{
+ CurveBaseOperation::deinitExecution();
this->m_inputFacProgram = NULL;
this->m_inputImageProgram = NULL;
- curvemapping_premultiply(this->m_curveMapping, 1);
}
diff --git a/source/blender/compositor/operations/COM_CurveBaseOperation.cpp b/source/blender/compositor/operations/COM_CurveBaseOperation.cpp
index 48d2bcd0ef9..36c49859880 100644
--- a/source/blender/compositor/operations/COM_CurveBaseOperation.cpp
+++ b/source/blender/compositor/operations/COM_CurveBaseOperation.cpp
@@ -38,3 +38,17 @@ void CurveBaseOperation::initExecution()
{
curvemapping_initialize(this->m_curveMapping);
}
+void CurveBaseOperation::deinitExecution()
+{
+ curvemapping_free(this->m_curveMapping);
+ this->m_curveMapping = NULL;
+}
+
+void CurveBaseOperation::setCurveMapping(CurveMapping *mapping)
+{
+ /* duplicate the curve to avoid glitches while drawing, see bug [#32374] */
+ if (this->m_curveMapping) {
+ curvemapping_free(this->m_curveMapping);
+ }
+ this->m_curveMapping = curvemapping_copy(mapping);
+}
diff --git a/source/blender/compositor/operations/COM_CurveBaseOperation.h b/source/blender/compositor/operations/COM_CurveBaseOperation.h
index 1636c13a571..6bfce26f532 100644
--- a/source/blender/compositor/operations/COM_CurveBaseOperation.h
+++ b/source/blender/compositor/operations/COM_CurveBaseOperation.h
@@ -38,7 +38,8 @@ public:
* Initialize the execution
*/
void initExecution();
+ void deinitExecution();
- void setCurveMapping(CurveMapping *mapping) { this->m_curveMapping = mapping; }
+ void setCurveMapping(CurveMapping *mapping);
};
#endif
diff --git a/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp b/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp
index 57d43f67c9b..8f58942fbe2 100644
--- a/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp
+++ b/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp
@@ -74,5 +74,6 @@ void HueSaturationValueCorrectOperation::executePixel(float output[4], float x,
void HueSaturationValueCorrectOperation::deinitExecution()
{
+ CurveBaseOperation::deinitExecution();
this->m_inputProgram = NULL;
}
diff --git a/source/blender/compositor/operations/COM_VectorCurveOperation.cpp b/source/blender/compositor/operations/COM_VectorCurveOperation.cpp
index d0a077fed61..6450b0716a3 100644
--- a/source/blender/compositor/operations/COM_VectorCurveOperation.cpp
+++ b/source/blender/compositor/operations/COM_VectorCurveOperation.cpp
@@ -56,5 +56,6 @@ void VectorCurveOperation::executePixel(float output[4], float x, float y, Pixel
void VectorCurveOperation::deinitExecution()
{
+ CurveBaseOperation::deinitExecution();
this->m_inputProgram = NULL;
}