desktop/source/splash/splash.cxx |   11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

New commits:
commit e96150520918d1bd008ba39485512e74cec3bc35
Author:     Arnaud Versini <arnaud.vers...@libreoffice.org>
AuthorDate: Tue Mar 29 16:52:08 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed Mar 30 12:45:06 2022 +0200

    desktop : use std::mutex instead of osl::Mutex
    
    Change-Id: I775baf9a2c9599b10eb855535ac0f8e438dd863b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132279
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx
index 2389e14f4d11..6402d9f7e99b 100644
--- a/desktop/source/splash/splash.cxx
+++ b/desktop/source/splash/splash.cxx
@@ -34,6 +34,8 @@
 #include <vcl/introwin.hxx>
 #include <vcl/virdev.hxx>
 
+#include <mutex>
+
 #define NOT_LOADED  (tools::Long(-1))
 #define NOT_LOADED_COLOR  (Color(ColorTransparency, 0xffffffff))
 
@@ -73,8 +75,6 @@ private:
     void SetScreenBitmap(BitmapEx &rBitmap);
     static void determineProgressRatioValues( double& rXRelPos, double& 
rYRelPos, double& rRelWidth, double& rRelHeight );
 
-    static osl::Mutex _aMutex;
-
     BitmapEx        _aIntroBmp;
     Color           _cProgressFrameColor;
     Color           _cProgressBarColor;
@@ -243,7 +243,8 @@ void SAL_CALL SplashScreen::setValue(sal_Int32 nValue)
 void SAL_CALL
 SplashScreen::initialize( const css::uno::Sequence< css::uno::Any>& aArguments 
)
 {
-    osl::MutexGuard  aGuard( _aMutex );
+    static std::mutex aMutex;
+    std::lock_guard  aGuard( aMutex );
     if (!aArguments.hasElements())
         return;
 
@@ -616,10 +617,6 @@ void SplashScreenWindow::Paint(vcl::RenderContext& 
rRenderContext, const tools::
     rRenderContext.DrawOutDev(Point(), GetOutputSizePixel(), Point(), 
_vdev->GetOutputSizePixel(), *_vdev);
 }
 
-
-// get service instance...
-osl::Mutex SplashScreen::_aMutex;
-
 }
 
 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*

Reply via email to