summaryrefslogtreecommitdiff
path: root/vcl/headless/svpgdi.cxx
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2021-12-29 15:38:28 +0900
committerTomaž Vajngerl <quikee@gmail.com>2022-01-05 04:35:15 +0100
commit5a7cdbfbd3cbf3ea92c38e78a3b159fdffed7740 (patch)
tree79473dbd0e655d9de7d266c9f493b8031f1b61b1 /vcl/headless/svpgdi.cxx
parentfed7cc51c9bea947478a2451d545cd9fa53ebd1d (diff)
vcl: move SystemDependentData classes to BitmapHelper
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 <quikee@gmail.com>
Diffstat (limited to 'vcl/headless/svpgdi.cxx')
-rw-r--r--vcl/headless/svpgdi.cxx55
1 files changed, 2 insertions, 53 deletions
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 <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/utils/canvastools.hxx>
-#include <basegfx/utils/systemdependentdata.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <comphelper/lok.hxx>
#include <unx/gendata.hxx>
@@ -60,60 +59,12 @@
namespace
{
- class SystemDependentData_BitmapHelper : public basegfx::SystemDependentData
- {
- private:
- std::shared_ptr<BitmapHelper> maBitmapHelper;
-
- public:
- SystemDependentData_BitmapHelper(
- basegfx::SystemDependentDataManager& rSystemDependentDataManager,
- const std::shared_ptr<BitmapHelper>& rBitmapHelper)
- : basegfx::SystemDependentData(rSystemDependentDataManager),
- maBitmapHelper(rBitmapHelper)
- {
- }
-
- const std::shared_ptr<BitmapHelper>& 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<MaskHelper> maMaskHelper;
-
- public:
- SystemDependentData_MaskHelper(
- basegfx::SystemDependentDataManager& rSystemDependentDataManager,
- const std::shared_ptr<MaskHelper>& rMaskHelper)
- : basegfx::SystemDependentData(rSystemDependentDataManager),
- maMaskHelper(rMaskHelper)
- {
- }
-
- const std::shared_ptr<MaskHelper>& 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<BitmapHelper>& rSurface)
+ void tryToUseSourceBuffer(const SalBitmap& rSourceBitmap, std::shared_ptr<BitmapHelper>& rSurface)
{
// MM02 try to access buffered BitmapHelper
std::shared_ptr<SystemDependentData_BitmapHelper> pSystemDependentData_BitmapHelper;
@@ -148,9 +99,7 @@ namespace
}
}
- void tryToUseMaskBuffer(
- const SalBitmap& rMaskBitmap,
- std::shared_ptr<MaskHelper>& rMask)
+ void tryToUseMaskBuffer(const SalBitmap& rMaskBitmap, std::shared_ptr<MaskHelper>& rMask)
{
// MM02 try to access buffered MaskHelper
std::shared_ptr<SystemDependentData_MaskHelper> pSystemDependentData_MaskHelper;