[Libreoffice-commits] core.git: drawinglayer/source include/drawinglayer
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Sun Sep 26 16:19:19 UTC 2021
drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx | 1 +
drawinglayer/source/primitive2d/controlprimitive2d.cxx | 1 +
drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx | 1 +
drawinglayer/source/primitive2d/gridprimitive2d.cxx | 1 +
drawinglayer/source/primitive2d/helplineprimitive2d.cxx | 1 +
drawinglayer/source/primitive2d/polygonprimitive2d.cxx | 1 +
drawinglayer/source/primitive2d/primitivetools2d.cxx | 4 ++++
drawinglayer/source/primitive2d/sceneprimitive2d.cxx | 5 +++--
drawinglayer/source/primitive2d/texteffectprimitive2d.cxx | 1 +
include/drawinglayer/primitive2d/baseprimitive2d.hxx | 4 ++--
10 files changed, 16 insertions(+), 4 deletions(-)
New commits:
commit 7809e2fe6cd237a547d93293d1ea434d16ccb689
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Sep 21 15:35:55 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sun Sep 26 18:18:46 2021 +0200
recursive_mutex -> mutex in BasePrimitive2DImplBase
Change-Id: I99e13b91afbf0d4d36b13e463fde2dec1c4d9e4e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122392
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx b/drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx
index f13b92bc4ddb..68f31cb4c67a 100644
--- a/drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx
@@ -82,6 +82,7 @@ namespace drawinglayer::primitive2d
}
// use parent implementation
+ aGuard.unlock();
BufferedDecompositionPrimitive2D::get2DDecomposition(rVisitor, rViewInformation);
}
diff --git a/drawinglayer/source/primitive2d/controlprimitive2d.cxx b/drawinglayer/source/primitive2d/controlprimitive2d.cxx
index 92f0ed5cf464..6eebc11a0fa5 100644
--- a/drawinglayer/source/primitive2d/controlprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/controlprimitive2d.cxx
@@ -336,6 +336,7 @@ namespace drawinglayer::primitive2d
}
// use parent implementation
+ aGuard.unlock();
BufferedDecompositionPrimitive2D::get2DDecomposition(rVisitor, rViewInformation);
}
diff --git a/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx b/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx
index 666f5459ed39..b01f8d76222a 100644
--- a/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx
@@ -176,6 +176,7 @@ namespace drawinglayer::primitive2d
std::unique_lock aGuard( m_aMutex );
bool bAdaptDistance(0 != getFillHatch().getMinimalDiscreteDistance());
+ aGuard.unlock();
if(bAdaptDistance)
{
// behave view-dependent
diff --git a/drawinglayer/source/primitive2d/gridprimitive2d.cxx b/drawinglayer/source/primitive2d/gridprimitive2d.cxx
index 64816b076862..c7929a89c7cf 100644
--- a/drawinglayer/source/primitive2d/gridprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/gridprimitive2d.cxx
@@ -324,6 +324,7 @@ namespace drawinglayer::primitive2d
}
// use parent implementation
+ aGuard.unlock();
BufferedDecompositionPrimitive2D::get2DDecomposition(rVisitor, rViewInformation);
}
diff --git a/drawinglayer/source/primitive2d/helplineprimitive2d.cxx b/drawinglayer/source/primitive2d/helplineprimitive2d.cxx
index 0db4f37470c2..ba1a680560bb 100644
--- a/drawinglayer/source/primitive2d/helplineprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/helplineprimitive2d.cxx
@@ -174,6 +174,7 @@ namespace drawinglayer::primitive2d
}
// use parent implementation
+ aGuard.unlock();
BufferedDecompositionPrimitive2D::get2DDecomposition(rVisitor, rViewInformation);
}
diff --git a/drawinglayer/source/primitive2d/polygonprimitive2d.cxx b/drawinglayer/source/primitive2d/polygonprimitive2d.cxx
index 184f72fdb810..961e02eec864 100644
--- a/drawinglayer/source/primitive2d/polygonprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/polygonprimitive2d.cxx
@@ -193,6 +193,7 @@ void PolygonMarkerPrimitive2D::get2DDecomposition(
}
// use parent implementation
+ aGuard.unlock();
BufferedDecompositionPrimitive2D::get2DDecomposition(rVisitor, rViewInformation);
}
diff --git a/drawinglayer/source/primitive2d/primitivetools2d.cxx b/drawinglayer/source/primitive2d/primitivetools2d.cxx
index 61e060e5ecfa..c4ab4f5c800b 100644
--- a/drawinglayer/source/primitive2d/primitivetools2d.cxx
+++ b/drawinglayer/source/primitive2d/primitivetools2d.cxx
@@ -45,6 +45,7 @@ namespace drawinglayer::primitive2d
}
// call base implementation
+ aGuard.unlock();
BufferedDecompositionPrimitive2D::get2DDecomposition(rVisitor, rViewInformation);
}
@@ -71,6 +72,7 @@ namespace drawinglayer::primitive2d
}
// call base implementation
+ aGuard.unlock();
BufferedDecompositionPrimitive2D::get2DDecomposition(rVisitor, rViewInformation);
}
@@ -94,6 +96,7 @@ namespace drawinglayer::primitive2d
}
// call base implementation
+ aGuard.unlock();
BufferedDecompositionPrimitive2D::get2DDecomposition(rVisitor, rViewInformation);
}
@@ -127,6 +130,7 @@ namespace drawinglayer::primitive2d
}
// call base implementation
+ aGuard.unlock();
BufferedDecompositionPrimitive2D::get2DDecomposition(rVisitor, rViewInformation);
}
diff --git a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx
index cde119d514ba..870d187b222c 100644
--- a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx
@@ -128,8 +128,6 @@ namespace drawinglayer::primitive2d
{
bool ScenePrimitive2D::impGetShadow3D() const
{
- std::unique_lock aGuard( m_aMutex );
-
// create on demand
if(!mbShadow3DChecked && !getChildren3D().empty())
{
@@ -511,6 +509,8 @@ namespace drawinglayer::primitive2d
Primitive2DContainer ScenePrimitive2D::getShadow2D() const
{
+ std::unique_lock aGuard( m_aMutex );
+
Primitive2DContainer aRetval;
// create 2D shadows from contained 3D primitives
@@ -681,6 +681,7 @@ namespace drawinglayer::primitive2d
}
// use parent implementation
+ aGuard.unlock();
BufferedDecompositionPrimitive2D::get2DDecomposition(rVisitor, rViewInformation);
}
diff --git a/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx b/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx
index 2a3f9e849eca..d05e727ce50c 100644
--- a/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx
@@ -233,6 +233,7 @@ void TextEffectPrimitive2D::get2DDecomposition(
}
// use parent implementation
+ aGuard.unlock();
BufferedDecompositionPrimitive2D::get2DDecomposition(rVisitor, rViewInformation);
}
diff --git a/include/drawinglayer/primitive2d/baseprimitive2d.hxx b/include/drawinglayer/primitive2d/baseprimitive2d.hxx
index f76c3e5a1520..c5ffa61d5230 100644
--- a/include/drawinglayer/primitive2d/baseprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/baseprimitive2d.hxx
@@ -37,7 +37,7 @@ class ViewInformation2D;
}
/** This is a custom re-implementation of cppu::WeakComponentImplHelper which uses
- std::recursive_mutex and skips parts of the XComponent stuff.
+ std::mutex and skips parts of the XComponent stuff.
*/
class DRAWINGLAYER_DLLPUBLIC BasePrimitive2DImplBase : public cppu::OWeakObject,
public css::lang::XComponent,
@@ -67,7 +67,7 @@ public:
}
protected:
- mutable std::recursive_mutex m_aMutex;
+ mutable std::mutex m_aMutex;
};
namespace drawinglayer::primitive2d
More information about the Libreoffice-commits
mailing list