summaryrefslogtreecommitdiff
path: root/vcl/inc
diff options
context:
space:
mode:
authorArmin Le Grand (allotropia) <armin.le.grand.extern@allotropia.de>2022-10-18 17:17:41 +0200
committerArmin Le Grand <Armin.Le.Grand@me.com>2022-10-18 19:38:53 +0200
commit02bd827f39c1e37baabeea1d83921a37450e8a97 (patch)
tree0d9c93bb25b7241525ae6ef631acd2e359bcdcf0 /vcl/inc
parentc74133420f6f9b4bc6b414b9c91d54cf8eb3f5af (diff)
Move access to SystemDependentDataHolder to Bitmap (2)
I was too positive thinking that SalBitmap would be fine, but it's locked to vcl. To be able to add system-dependent BitmapBuffering I move the access to Bitmap now. This is no functional change, but offers the same access as e.g. B2DPolygon/B2DPolyPolygon offer already. Also cleaned up usage/access to SystemDependentDataManager which removes quite some code in constructors and makes things easier in general. Change-Id: I2baa40a12479fab0fe66063a018f058c6b8f5597 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141507 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'vcl/inc')
-rw-r--r--vcl/inc/headless/BitmapHelper.hxx7
-rw-r--r--vcl/inc/headless/CairoCommon.hxx3
-rw-r--r--vcl/inc/headless/svpbmp.hxx1
-rw-r--r--vcl/inc/salbmp.hxx8
-rw-r--r--vcl/inc/win/salbmp.h1
5 files changed, 7 insertions, 13 deletions
diff --git a/vcl/inc/headless/BitmapHelper.hxx b/vcl/inc/headless/BitmapHelper.hxx
index c86a79239d47..0aed5e3693fc 100644
--- a/vcl/inc/headless/BitmapHelper.hxx
+++ b/vcl/inc/headless/BitmapHelper.hxx
@@ -52,9 +52,7 @@ private:
std::shared_ptr<BitmapHelper> maBitmapHelper;
public:
- SystemDependentData_BitmapHelper(
- basegfx::SystemDependentDataManager& rSystemDependentDataManager,
- std::shared_ptr<BitmapHelper> xBitmapHelper);
+ SystemDependentData_BitmapHelper(std::shared_ptr<BitmapHelper> xBitmapHelper);
const std::shared_ptr<BitmapHelper>& getBitmapHelper() const { return maBitmapHelper; };
virtual sal_Int64 estimateUsageInBytes() const override;
@@ -66,8 +64,7 @@ private:
std::shared_ptr<MaskHelper> maMaskHelper;
public:
- SystemDependentData_MaskHelper(basegfx::SystemDependentDataManager& rSystemDependentDataManager,
- std::shared_ptr<MaskHelper> xMaskHelper);
+ SystemDependentData_MaskHelper(std::shared_ptr<MaskHelper> xMaskHelper);
const std::shared_ptr<MaskHelper>& getMaskHelper() const { return maMaskHelper; };
virtual sal_Int64 estimateUsageInBytes() const override;
diff --git a/vcl/inc/headless/CairoCommon.hxx b/vcl/inc/headless/CairoCommon.hxx
index e8b1a4927e21..476b031c451b 100644
--- a/vcl/inc/headless/CairoCommon.hxx
+++ b/vcl/inc/headless/CairoCommon.hxx
@@ -96,8 +96,7 @@ private:
std::vector<double> maStroke;
public:
- SystemDependentData_CairoPath(basegfx::SystemDependentDataManager& rSystemDependentDataManager,
- size_t nSizeMeasure, cairo_t* cr, bool bNoJoin, bool bAntiAlias,
+ SystemDependentData_CairoPath(size_t nSizeMeasure, cairo_t* cr, bool bNoJoin, bool bAntiAlias,
const std::vector<double>* pStroke); // MM01
virtual ~SystemDependentData_CairoPath() override;
diff --git a/vcl/inc/headless/svpbmp.hxx b/vcl/inc/headless/svpbmp.hxx
index 29e730ad4d6f..cd90d23e8e22 100644
--- a/vcl/inc/headless/svpbmp.hxx
+++ b/vcl/inc/headless/svpbmp.hxx
@@ -61,7 +61,6 @@ public:
virtual bool Scale( const double& rScaleX, const double& rScaleY, BmpScaleFlag nScaleFlag ) override;
virtual bool Replace( const Color& rSearchColor, const Color& rReplaceColor, sal_uInt8 nTol ) override;
-protected:
virtual const basegfx::SystemDependentDataHolder* accessSystemDependentDataHolder() const override;
};
diff --git a/vcl/inc/salbmp.hxx b/vcl/inc/salbmp.hxx
index 32b1ffa14598..a48b48b2451c 100644
--- a/vcl/inc/salbmp.hxx
+++ b/vcl/inc/salbmp.hxx
@@ -129,13 +129,13 @@ protected:
int width, int height, int bitCount, int bytesPerRow, const BitmapPalette& palette,
BitConvert type );
+public:
// access to SystemDependentDataHolder, to support overload in derived class(es)
virtual const basegfx::SystemDependentDataHolder* accessSystemDependentDataHolder() const;
-public:
// exclusive management op's for SystemDependentData at SalBitmap
template<class T>
- std::shared_ptr<T> getSystemDependentDataT() const
+ std::shared_ptr<T> getSystemDependentData() const
{
const basegfx::SystemDependentDataHolder* pDataHolder(accessSystemDependentDataHolder());
if(pDataHolder)
@@ -144,13 +144,13 @@ public:
}
template<class T, class... Args>
- std::shared_ptr<T> addOrReplaceSystemDependentDataT(basegfx::SystemDependentDataManager& manager, Args&&... args) const
+ std::shared_ptr<T> addOrReplaceSystemDependentData(Args&&... args) const
{
const basegfx::SystemDependentDataHolder* pDataHolder(accessSystemDependentDataHolder());
if(!pDataHolder)
return std::shared_ptr<T>();
- std::shared_ptr<T> r = std::make_shared<T>(manager, std::forward<Args>(args)...);
+ std::shared_ptr<T> r = std::make_shared<T>(std::forward<Args>(args)...);
// tdf#129845 only add to buffer if a relevant buffer time is estimated
if(r->calculateCombinedHoldCyclesInSeconds() > 0)
diff --git a/vcl/inc/win/salbmp.h b/vcl/inc/win/salbmp.h
index 9db57b5cc9f7..d8d00e727f76 100644
--- a/vcl/inc/win/salbmp.h
+++ b/vcl/inc/win/salbmp.h
@@ -85,7 +85,6 @@ public:
virtual bool Scale( const double& rScaleX, const double& rScaleY, BmpScaleFlag nScaleFlag ) override;
virtual bool Replace( const Color& rSearchColor, const Color& rReplaceColor, sal_uInt8 nTol ) override;
-protected:
virtual const basegfx::SystemDependentDataHolder* accessSystemDependentDataHolder() const override;
};