Skip to content

Commit

Permalink
Refactor OCIOIPNode to remove deprecated QMutex::Recursive
Browse files Browse the repository at this point in the history
  • Loading branch information
bernie-laberge committed Jan 21, 2025
1 parent 091ce0a commit a392f36
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/lib/ip/OCIONodes/OCIOIPNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ OCIOIPNode::OCIOIPNode(const string& name,
IPGraph* graph,
GroupIPNode* group)
: IPNode(name, def, graph, group),
m_useRawConfig(false),
m_lock(QMutex::Recursive)
m_useRawConfig(false
{
Property::Info* info = new Property::Info();
info->setPersistent(false);
Expand Down Expand Up @@ -291,11 +290,11 @@ OCIO::MatrixTransformRcPtr OCIOIPNode::createMatrixTransformXYZToRec709() const
return matrix_xyz_to_rec709;
}

// Note: Ensure that the m_lock mutex is locked prior to calling this function
OCIO::MatrixTransformRcPtr OCIOIPNode::getMatrixTransformXYZToRec709()
{
if (!m_matrix_xyz_to_rec709)
{
QMutexLocker lock(&this->m_lock);
if (!m_matrix_xyz_to_rec709)
{
m_matrix_xyz_to_rec709 = createMatrixTransformXYZToRec709();
Expand All @@ -305,11 +304,11 @@ OCIO::MatrixTransformRcPtr OCIOIPNode::getMatrixTransformXYZToRec709()
return m_matrix_xyz_to_rec709;
}

// Note: Ensure that the m_lock mutex is locked prior to calling this function
OCIO::MatrixTransformRcPtr OCIOIPNode::getMatrixTransformRec709ToXYZ()
{
if (!m_matrix_rec709_to_xyz)
{
QMutexLocker lock(&this->m_lock);
if (!m_matrix_rec709_to_xyz)
{
m_matrix_rec709_to_xyz = createMatrixTransformXYZToRec709();
Expand Down

0 comments on commit a392f36

Please sign in to comment.