diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-10-27 08:46:08 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-10-27 10:49:58 +0200 |
commit | ab83d7d57d0fae106037b12651adb397b48354e4 (patch) | |
tree | 389e916c56bff6fc7f91a441f8d57fba2af865fc | |
parent | 97cd814ce88cac93f28408e983f3cfc0f94bb6bf (diff) |
tdf#123419 using glyph cache for drawinglayer rendering
speeds up rendering by 5% or so
Change-Id: I9feaae75cf2779adf06fcc2429be35ac88193ccf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141893
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | drawinglayer/source/processor2d/vclprocessor2d.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index 24b71ebb1873..a8874453bd4f 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -27,6 +27,7 @@ #include <tools/debug.hxx> #include <tools/fract.hxx> #include <utility> +#include <vcl/glyphitemcache.hxx> #include <vcl/graph.hxx> #include <vcl/outdev.hxx> #include <rtl/ustrbuf.hxx> @@ -364,8 +365,11 @@ void VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D( if (!aDXArray.empty()) { + const SalLayoutGlyphs* pGlyphs = SalLayoutGlyphsCache::self()->GetLayoutGlyphs( + mpOutputDevice, aText, nPos, nLen); mpOutputDevice->DrawTextArray(aStartPoint, aText, aDXArray, - rTextCandidate.getKashidaArray(), nPos, nLen); + rTextCandidate.getKashidaArray(), nPos, nLen, + SalLayoutFlags::NONE, pGlyphs); } else { |