drawinglayer/source/processor2d/vclpixelprocessor2d.cxx | 8 ++++++-- drawinglayer/source/processor2d/vclpixelprocessor2d.hxx | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-)
New commits: commit 8c30a0b9289e48598baafbd6c264d0ba58c0d40e Author: Caolán McNamara <[email protected]> AuthorDate: Thu Feb 22 20:25:27 2024 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Fri Feb 23 10:36:30 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/+/163791 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx index 21939efad6c6..bb3e29bf8044 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(); @@ -414,7 +418,7 @@ void VclPixelProcessor2D::processTextSimplePortionPrimitive2D( const DrawModeFlags nOriginalDrawMode(mpOutputDevice->GetDrawMode()); adaptTextToFillDrawMode(); - if (officecfg::Office::Common::Drawinglayer::RenderSimpleTextDirect::get()) + if (SAL_LIKELY(m_bRenderSimpleTextDirect)) { RenderTextSimpleOrDecoratedPortionPrimitive2D(rCandidate); } @@ -434,7 +438,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 */
