summaryrefslogtreecommitdiff
path: root/drawinglayer/source
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 /drawinglayer/source
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 'drawinglayer/source')
-rw-r--r--drawinglayer/source/texture/texture.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/drawinglayer/source/texture/texture.cxx b/drawinglayer/source/texture/texture.cxx
index 1390ee3d82bf..0960ffbbbde3 100644
--- a/drawinglayer/source/texture/texture.cxx
+++ b/drawinglayer/source/texture/texture.cxx
@@ -78,6 +78,7 @@ namespace drawinglayer::texture
, mnRequestedSteps(nRequestedSteps)
, mnColorStops(rColorStops)
, mfBorder(fBorder)
+ , maLastColorStopRange()
{
}
@@ -265,7 +266,7 @@ namespace drawinglayer::texture
// texture-back-transform X/Y -> t [0.0..1.0] and determine color
const double fScaler(basegfx::utils::getLinearGradientAlpha(rUV, maGradientInfo));
- rBColor = basegfx::utils::modifyBColor(mnColorStops, fScaler, mnRequestedSteps);
+ rBColor = basegfx::utils::modifyBColor(mnColorStops, fScaler, mnRequestedSteps, maLastColorStopRange);
}
GeoTexSvxGradientAxial::GeoTexSvxGradientAxial(
@@ -392,7 +393,7 @@ namespace drawinglayer::texture
const double fScaler(basegfx::utils::getAxialGradientAlpha(rUV, maGradientInfo));
// we use the reverse ColorSteps here, so mirror scaler value
- rBColor = basegfx::utils::modifyBColor(mnColorStops, 1.0 - fScaler, mnRequestedSteps);
+ rBColor = basegfx::utils::modifyBColor(mnColorStops, 1.0 - fScaler, mnRequestedSteps, maLastColorStopRange);
}
@@ -484,7 +485,7 @@ namespace drawinglayer::texture
// texture-back-transform X/Y -> t [0.0..1.0] and determine color
const double fScaler(basegfx::utils::getRadialGradientAlpha(rUV, maGradientInfo));
- rBColor = basegfx::utils::modifyBColor(mnColorStops, fScaler, mnRequestedSteps);
+ rBColor = basegfx::utils::modifyBColor(mnColorStops, fScaler, mnRequestedSteps, maLastColorStopRange);
}
@@ -585,7 +586,7 @@ namespace drawinglayer::texture
// texture-back-transform X/Y -> t [0.0..1.0] and determine color
const double fScaler(basegfx::utils::getEllipticalGradientAlpha(rUV, maGradientInfo));
- rBColor = basegfx::utils::modifyBColor(mnColorStops, fScaler, mnRequestedSteps);
+ rBColor = basegfx::utils::modifyBColor(mnColorStops, fScaler, mnRequestedSteps, maLastColorStopRange);
}
@@ -679,7 +680,7 @@ namespace drawinglayer::texture
// texture-back-transform X/Y -> t [0.0..1.0] and determine color
const double fScaler(basegfx::utils::getSquareGradientAlpha(rUV, maGradientInfo));
- rBColor = basegfx::utils::modifyBColor(mnColorStops, fScaler, mnRequestedSteps);
+ rBColor = basegfx::utils::modifyBColor(mnColorStops, fScaler, mnRequestedSteps, maLastColorStopRange);
}
@@ -780,7 +781,7 @@ namespace drawinglayer::texture
// texture-back-transform X/Y -> t [0.0..1.0] and determine color
const double fScaler(basegfx::utils::getRectangularGradientAlpha(rUV, maGradientInfo));
- rBColor = basegfx::utils::modifyBColor(mnColorStops, fScaler, mnRequestedSteps);
+ rBColor = basegfx::utils::modifyBColor(mnColorStops, fScaler, mnRequestedSteps, maLastColorStopRange);
}