[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - drawinglayer/source
Mike Kaganski (via logerrit)
logerrit at kemper.freedesktop.org
Sat Jun 20 05:41:21 UTC 2020
drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx | 2 +-
drawinglayer/source/processor2d/vclpixelprocessor2d.cxx | 5 +++--
drawinglayer/source/processor2d/vclpixelprocessor2d.hxx | 4 +++-
drawinglayer/source/processor2d/vclprocessor2d.cxx | 5 +++--
drawinglayer/source/processor2d/vclprocessor2d.hxx | 3 ++-
5 files changed, 12 insertions(+), 7 deletions(-)
New commits:
commit 66613a37ea258727838608d1b503f8d5ee9f6007
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Fri Jun 19 12:17:18 2020 +0300
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Sat Jun 20 07:40:50 2020 +0200
tdf#134134: consider color modifier stack when pixel-processing
Add initial color stack as an optional processor ctor argument,
so that it wouldn't be possibe to modify it after construction
from outside randomly (which could break the stack state).
Change-Id: I8aae4b806531fa61cc67def865297f5de1cf0755
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96684
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
(cherry picked from commit 4f4c99c6659e78e5d28e38808148e4284a0f0832)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96696
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index 297fd725c7b7..1de36cd9f47d 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -2397,7 +2397,7 @@ void VclMetafileProcessor2D::processPrimitive2DOnPixelProcessor(
auto pBufferDevice(CreateBufferDevice(aViewRange, 500000, aViewInfo, aRectLogic, aSizePixel));
if (pBufferDevice)
{
- VclPixelProcessor2D aBufferProcessor(aViewInfo, *pBufferDevice);
+ VclPixelProcessor2D aBufferProcessor(aViewInfo, *pBufferDevice, maBColorModifierStack);
// draw content using pixel renderer
primitive2d::Primitive2DReference aRef(
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index 8d217dcf18db..c7ec6525fce1 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -80,8 +80,9 @@ struct VclPixelProcessor2D::Impl
};
VclPixelProcessor2D::VclPixelProcessor2D(const geometry::ViewInformation2D& rViewInformation,
- OutputDevice& rOutDev)
- : VclProcessor2D(rViewInformation, rOutDev)
+ OutputDevice& rOutDev,
+ const basegfx::BColorModifierStack& rInitStack)
+ : VclProcessor2D(rViewInformation, rOutDev, rInitStack)
, m_pImpl(new Impl(rOutDev))
{
// prepare maCurrentTransformation matrix with viewTransformation to target directly to pixels
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
index e78d1f08225a..edda8e7f021d 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx
@@ -100,7 +100,9 @@ class VclPixelProcessor2D final : public VclProcessor2D
public:
/// constructor/destructor
- VclPixelProcessor2D(const geometry::ViewInformation2D& rViewInformation, OutputDevice& rOutDev);
+ VclPixelProcessor2D(const geometry::ViewInformation2D& rViewInformation, OutputDevice& rOutDev,
+ const basegfx::BColorModifierStack& rInitStack
+ = basegfx::BColorModifierStack());
virtual ~VclPixelProcessor2D() override;
};
} // end of namespace drawinglayer::processor2d
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index e64995c8b50a..5a0a85f911ef 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -1485,10 +1485,11 @@ void VclProcessor2D::adaptTextToFillDrawMode() const
// process support
VclProcessor2D::VclProcessor2D(const geometry::ViewInformation2D& rViewInformation,
- OutputDevice& rOutDev)
+ OutputDevice& rOutDev,
+ const basegfx::BColorModifierStack& rInitStack)
: BaseProcessor2D(rViewInformation)
, mpOutputDevice(&rOutDev)
- , maBColorModifierStack()
+ , maBColorModifierStack(rInitStack)
, maCurrentTransformation()
, maDrawinglayerOpt()
, mnPolygonStrokePrimitive2D(0)
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.hxx b/drawinglayer/source/processor2d/vclprocessor2d.hxx
index 3b1b997a7cc4..dbca9ed4ba25 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.hxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.hxx
@@ -120,7 +120,8 @@ protected:
public:
// constructor/destructor
- VclProcessor2D(const geometry::ViewInformation2D& rViewInformation, OutputDevice& rOutDev);
+ VclProcessor2D(const geometry::ViewInformation2D& rViewInformation, OutputDevice& rOutDev,
+ const basegfx::BColorModifierStack& rInitStack = basegfx::BColorModifierStack());
virtual ~VclProcessor2D() override;
// access to Drawinglayer configuration options
More information about the Libreoffice-commits
mailing list