summaryrefslogtreecommitdiff
path: root/include/basegfx
diff options
context:
space:
mode:
authorArmin Le Grand (allotropia) <armin.le.grand.extern@allotropia.de>2023-04-04 14:57:06 +0200
committerArmin Le Grand <Armin.Le.Grand@me.com>2023-04-04 18:55:49 +0200
commit4b5203ebf4ca5894f4d7dd37a141832df26e8b9a (patch)
treee3f3497bdc121eade2d9c812ae26c3d8d0c8d718 /include/basegfx
parent37928bef1c23f30df04bc7e95fcbc202c8cb4299 (diff)
MCGR: Improve performance for texture-mapped MCGR processing
Change-Id: I20b32e7c272112c6c3d9f7ee0ef59c6d4d006d94 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150020 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'include/basegfx')
-rw-r--r--include/basegfx/utils/gradienttools.hxx20
1 files changed, 19 insertions, 1 deletions
diff --git a/include/basegfx/utils/gradienttools.hxx b/include/basegfx/utils/gradienttools.hxx
index ea1802c291f8..f438fdf3bd4a 100644
--- a/include/basegfx/utils/gradienttools.hxx
+++ b/include/basegfx/utils/gradienttools.hxx
@@ -194,6 +194,23 @@ namespace basegfx
}
};
+ // helper data struct to support buffering entries in
+ // gradient texture mapping, see usages for more info
+ struct UNLESS_MERGELIBS(BASEGFX_DLLPUBLIC) ColorStopRange
+ {
+ basegfx::BColor maColorStart;
+ basegfx::BColor maColorEnd;
+ double mfOffsetStart;
+ double mfOffsetEnd;
+
+ ColorStopRange()
+ : maColorStart()
+ , maColorEnd()
+ , mfOffsetStart(0.0)
+ , mfOffsetEnd(0.0)
+ {}
+ };
+
namespace utils
{
/* Tooling method to linearly blend the Colors contained in
@@ -293,7 +310,8 @@ namespace basegfx
BASEGFX_DLLPUBLIC BColor modifyBColor(
const ColorStops& rColorStops,
double fScaler,
- sal_uInt32 nRequestedSteps);
+ sal_uInt32 nRequestedSteps,
+ ColorStopRange& rLastColorStopRange);
/* Helper to calculate numberOfSteps needed to represent
gradient for the given two colors: