diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-08-03 20:25:50 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-04 08:42:17 +0200 |
commit | e643f8703b85668a396676e99ec7e9ee2133368c (patch) | |
tree | 32ddb35e65c292c4373178086a206ffbd3ea3d78 | |
parent | e8d4f0df075a7033dffa9f6a255d99cf595d1ad3 (diff) |
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@collabora.co.uk>
-rw-r--r-- | toolkit/inc/awt/vclxbitmap.hxx | 6 | ||||
-rw-r--r-- | toolkit/source/awt/vclxbitmap.cxx | 8 |
2 files changed, 7 insertions, 7 deletions
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(); } |