[Libreoffice-commits] core.git: toolkit/inc toolkit/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Wed Aug 4 06:42:51 UTC 2021


 toolkit/inc/awt/vclxbitmap.hxx    |    6 +++---
 toolkit/source/awt/vclxbitmap.cxx |    8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit e643f8703b85668a396676e99ec7e9ee2133368c
Author:     Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Tue Aug 3 20:25:50 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Aug 4 08:42:17 2021 +0200

    osl::Mutex->std::mutex in VCLXBitmap
    
    Change-Id: I436f9079468a365622a91d015fddbe5f8fa923d2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119946
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/toolkit/inc/awt/vclxbitmap.hxx b/toolkit/inc/awt/vclxbitmap.hxx
index 61be1e4047ff..97475d7000c8 100644
--- a/toolkit/inc/awt/vclxbitmap.hxx
+++ b/toolkit/inc/awt/vclxbitmap.hxx
@@ -26,7 +26,7 @@
 #include <com/sun/star/util/XAccounting.hpp>
 #include <comphelper/servicehelper.hxx>
 #include <cppuhelper/implbase.hxx>
-#include <osl/mutex.hxx>
+#include <mutex>
 #include <vcl/bitmapex.hxx>
 
 
@@ -38,10 +38,10 @@ class VCLXBitmap final : public cppu::WeakImplHelper<
                             css::lang::XUnoTunnel,
                             css::util::XAccounting>
 {
-    ::osl::Mutex    maMutex;
+    std::mutex    maMutex;
     BitmapEx        maBitmap;
 
-    ::osl::Mutex&   GetMutex() { return maMutex; }
+    std::mutex&   GetMutex() { return maMutex; }
 
 
 public:
diff --git a/toolkit/source/awt/vclxbitmap.cxx b/toolkit/source/awt/vclxbitmap.cxx
index 4b08ebd40a7f..e094a28d29c0 100644
--- a/toolkit/source/awt/vclxbitmap.cxx
+++ b/toolkit/source/awt/vclxbitmap.cxx
@@ -33,7 +33,7 @@ UNO3_GETIMPLEMENTATION_IMPL( VCLXBitmap );
 // css::awt::XBitmap
 css::awt::Size VCLXBitmap::getSize()
 {
-    ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+    std::scoped_lock aGuard( GetMutex() );
 
     css::awt::Size aSize( maBitmap.GetSizePixel().Width(), maBitmap.GetSizePixel().Height() );
     return aSize;
@@ -41,7 +41,7 @@ css::awt::Size VCLXBitmap::getSize()
 
 css::uno::Sequence< sal_Int8 > VCLXBitmap::getDIB()
 {
-    ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+    std::scoped_lock aGuard( GetMutex() );
 
     SvMemoryStream aMem;
     WriteDIB(maBitmap.GetBitmap(), aMem, false, true);
@@ -50,14 +50,14 @@ css::uno::Sequence< sal_Int8 > VCLXBitmap::getDIB()
 
 css::uno::Sequence< sal_Int8 > VCLXBitmap::getMaskDIB()
 {
-    ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+    std::scoped_lock aGuard( GetMutex() );
 
     return vcl::bitmap::GetMaskDIB(maBitmap);
 }
 
 sal_Int64 SAL_CALL VCLXBitmap::estimateUsage()
 {
-    ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+    std::scoped_lock aGuard( GetMutex() );
 
     return maBitmap.GetSizeBytes();
 }


More information about the Libreoffice-commits mailing list