drawinglayer/source/processor2d/vclpixelprocessor2d.cxx | 8 ++++++-- drawinglayer/source/processor2d/vclpixelprocessor2d.hxx | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-)
New commits: commit a3dd5923628caa3cb6c4dcecc62591acc0912bb2 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Thu Feb 22 20:25:27 2024 +0000 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Fri Feb 23 11:04:35 2024 +0100 optimize the text drawing, that's what we do most of maybe the alternative branch should be dropped, turned into a debugging option because it is obscure and presumably doesn't result in better results that using the platform text rendering Change-Id: Ief6882f7acf8737ca64b10e74e5d94aade60d71a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163794 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx index b812060d712e..1be240610b03 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx @@ -75,6 +75,10 @@ VclPixelProcessor2D::VclPixelProcessor2D(const geometry::ViewInformation2D& rVie const basegfx::BColorModifierStack& rInitStack) : VclProcessor2D(rViewInformation, rOutDev, rInitStack) , m_nOrigAntiAliasing(rOutDev.GetAntialiasing()) + , m_bRenderSimpleTextDirect( + officecfg::Office::Common::Drawinglayer::RenderSimpleTextDirect::get()) + , m_bRenderDecoratedTextDirect( + officecfg::Office::Common::Drawinglayer::RenderDecoratedTextDirect::get()) { // prepare maCurrentTransformation matrix with viewTransformation to target directly to pixels maCurrentTransformation = rViewInformation.getObjectToViewTransformation(); @@ -403,7 +407,7 @@ void VclPixelProcessor2D::processTextSimplePortionPrimitive2D( const DrawModeFlags nOriginalDrawMode(mpOutputDevice->GetDrawMode()); adaptTextToFillDrawMode(); - if (officecfg::Office::Common::Drawinglayer::RenderSimpleTextDirect::get()) + if (SAL_LIKELY(m_bRenderSimpleTextDirect)) { RenderTextSimpleOrDecoratedPortionPrimitive2D(rCandidate); } @@ -423,7 +427,7 @@ void VclPixelProcessor2D::processTextDecoratedPortionPrimitive2D( const DrawModeFlags nOriginalDrawMode(mpOutputDevice->GetDrawMode()); adaptTextToFillDrawMode(); - if (officecfg::Office::Common::Drawinglayer::RenderDecoratedTextDirect::get()) + if (SAL_LIKELY(m_bRenderDecoratedTextDirect)) { RenderTextSimpleOrDecoratedPortionPrimitive2D(rCandidate); } diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx index c144ba9647eb..185ed52ed897 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.hxx @@ -55,6 +55,9 @@ class VclPixelProcessor2D final : public VclProcessor2D { AntialiasingFlags m_nOrigAntiAliasing; + bool m_bRenderSimpleTextDirect; + bool m_bRenderDecoratedTextDirect; + /* the local processor for BasePrimitive2D-Implementation based primitives, called from the common process()-implementation */