From 5a7cdbfbd3cbf3ea92c38e78a3b159fdffed7740 Mon Sep 17 00:00:00 2001 From: Tomaž Vajngerl Date: Wed, 29 Dec 2021 15:38:28 +0900 Subject: vcl: move SystemDependentData classes to BitmapHelper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SystemDependentData_BitmapHelper, SystemDependentData_MaskHelper to BitmapHelper.{hxx,cxx} files. Change-Id: I23f3b4badd8e262c442e5c6387876b078f22fd73 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127926 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl --- vcl/headless/svpgdi.cxx | 55 ++----------------------------------------------- 1 file changed, 2 insertions(+), 53 deletions(-) (limited to 'vcl/headless/svpgdi.cxx') diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index 33e4e220cc69..3a321af10293 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx @@ -46,7 +46,6 @@ #include #include #include -#include #include #include #include @@ -60,60 +59,12 @@ namespace { - class SystemDependentData_BitmapHelper : public basegfx::SystemDependentData - { - private: - std::shared_ptr maBitmapHelper; - - public: - SystemDependentData_BitmapHelper( - basegfx::SystemDependentDataManager& rSystemDependentDataManager, - const std::shared_ptr& rBitmapHelper) - : basegfx::SystemDependentData(rSystemDependentDataManager), - maBitmapHelper(rBitmapHelper) - { - } - - const std::shared_ptr& getBitmapHelper() const { return maBitmapHelper; }; - virtual sal_Int64 estimateUsageInBytes() const override; - }; - - sal_Int64 SystemDependentData_BitmapHelper::estimateUsageInBytes() const - { - return estimateUsageInBytesForSurfaceHelper(maBitmapHelper.get()); - } - - class SystemDependentData_MaskHelper : public basegfx::SystemDependentData - { - private: - std::shared_ptr maMaskHelper; - - public: - SystemDependentData_MaskHelper( - basegfx::SystemDependentDataManager& rSystemDependentDataManager, - const std::shared_ptr& rMaskHelper) - : basegfx::SystemDependentData(rSystemDependentDataManager), - maMaskHelper(rMaskHelper) - { - } - - const std::shared_ptr& getMaskHelper() const { return maMaskHelper; }; - virtual sal_Int64 estimateUsageInBytes() const override; - }; - - sal_Int64 SystemDependentData_MaskHelper::estimateUsageInBytes() const - { - return estimateUsageInBytesForSurfaceHelper(maMaskHelper.get()); - } - // MM02 decide to use buffers or not const char* pDisableMM02Goodies(getenv("SAL_DISABLE_MM02_GOODIES")); bool bUseBuffer(nullptr == pDisableMM02Goodies); const tools::Long nMinimalSquareSizeToBuffer(64*64); - void tryToUseSourceBuffer( - const SalBitmap& rSourceBitmap, - std::shared_ptr& rSurface) + void tryToUseSourceBuffer(const SalBitmap& rSourceBitmap, std::shared_ptr& rSurface) { // MM02 try to access buffered BitmapHelper std::shared_ptr pSystemDependentData_BitmapHelper; @@ -148,9 +99,7 @@ namespace } } - void tryToUseMaskBuffer( - const SalBitmap& rMaskBitmap, - std::shared_ptr& rMask) + void tryToUseMaskBuffer(const SalBitmap& rMaskBitmap, std::shared_ptr& rMask) { // MM02 try to access buffered MaskHelper std::shared_ptr pSystemDependentData_MaskHelper; -- cgit