summaryrefslogtreecommitdiff
path: root/vcl/inc/win
diff options
context:
space:
mode:
authorArmin Le Grand (allotropia) <armin.le.grand.extern@allotropia.de>2022-10-17 14:22:08 +0200
committerArmin Le Grand <Armin.Le.Grand@me.com>2022-10-17 19:13:53 +0200
commit2c5c611077278edd86247c58a078398ecf17a701 (patch)
tree2dd6974861b2543b47ea2618a6eff7270fd102f6 /vcl/inc/win
parentdba6eb60bcd9f55b49699e767993707ec26a8565 (diff)
Move access to SystemDependentDataHolder to SalBitmap
To be able to buffer BitmapData which is created based on Bitmap class data, move the access to basegfx::SystemDependentDataHolder from classes where it was used until now (WinSalBitmap and SvpSalBitmap) up to SalBitmap which is accessible outside vcl. This is a reorder plus a virtual access method to detect/access that helper layer, no functional change. It will be needed for system-dependent renderers when they want to use that standard buffering e.g. already used in the headless & windows backends. Change-Id: Ib30e7b98e722b977bb0c87ad253e3ffc1841e87e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141456 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'vcl/inc/win')
-rw-r--r--vcl/inc/win/salbmp.h23
1 files changed, 2 insertions, 21 deletions
diff --git a/vcl/inc/win/salbmp.h b/vcl/inc/win/salbmp.h
index c8fe3d851011..9db57b5cc9f7 100644
--- a/vcl/inc/win/salbmp.h
+++ b/vcl/inc/win/salbmp.h
@@ -85,27 +85,8 @@ 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;
- // exclusive management op's for SystemDependentData at WinSalBitmap
- template<class T>
- std::shared_ptr<T> getSystemDependentData() const
- {
- return std::static_pointer_cast<T>(basegfx::SystemDependentDataHolder::getSystemDependentData(typeid(T).hash_code()));
- }
-
- template<class T, class... Args>
- std::shared_ptr<T> addOrReplaceSystemDependentData(basegfx::SystemDependentDataManager& manager, Args&&... args) const
- {
- std::shared_ptr<T> r = std::make_shared<T>(manager, std::forward<Args>(args)...);
-
- // tdf#129845 only add to buffer if a relevant buffer time is estimated
- if(r->calculateCombinedHoldCyclesInSeconds() > 0)
- {
- basegfx::SystemDependentData_SharedPtr r2(r);
- const_cast< WinSalBitmap* >(this)->basegfx::SystemDependentDataHolder::addOrReplaceSystemDependentData(r2);
- }
-
- return r;
- }
+protected:
+ virtual const basegfx::SystemDependentDataHolder* accessSystemDependentDataHolder() const override;
};
#endif // INCLUDED_VCL_INC_WIN_SALBMP_H