include/vcl/glyphitemcache.hxx      |   10 +++++-----
 include/vcl/rendercontext/State.hxx |    2 +-
 vcl/source/gdi/impglyphitem.cxx     |    4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit b5a794818e1517006925402fa436b019381f40a6
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Tue Oct 10 13:25:36 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed Oct 11 14:44:08 2023 +0200

    cool#7318 Calc rendering acceleration (part2)
    
    we are spending a lot of time in SalLayoutGlyphsCache::GetLayoutGlyphs,
    and most of that is inserting into the GlyphsCache, which has a very
    very large key.
    
    Shrink that key a little bit
    
    Change-Id: I6f27c147652521502dba4517afd9a2ae2a6daebb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157723
    Reviewed-by: Michael Meeks <michael.me...@collabora.com>
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>

diff --git a/include/vcl/glyphitemcache.hxx b/include/vcl/glyphitemcache.hxx
index 6c4c1ea1294b..a5a8ec1518e4 100644
--- a/include/vcl/glyphitemcache.hxx
+++ b/include/vcl/glyphitemcache.hxx
@@ -80,12 +80,12 @@ private:
         double fontScaleX;
         double fontScaleY;
         MapMode mapMode;
-        bool rtl;
-        bool disabledLigatures; // because of fixed pitch
-        bool artificialItalic;
-        bool artificialBold;
-        vcl::text::ComplexTextLayoutFlags layoutMode;
         LanguageType digitLanguage;
+        vcl::text::ComplexTextLayoutFlags layoutMode;
+        bool rtl : 1;
+        bool disabledLigatures : 1; // because of fixed pitch
+        bool artificialItalic : 1;
+        bool artificialBold : 1;
         size_t hashValue;
         CachedGlyphsKey(const VclPtr<const OutputDevice>& dev, OUString t, 
sal_Int32 i, sal_Int32 l,
                         tools::Long w);
diff --git a/include/vcl/rendercontext/State.hxx 
b/include/vcl/rendercontext/State.hxx
index a433dbd8fb05..0a3d4327af8f 100644
--- a/include/vcl/rendercontext/State.hxx
+++ b/include/vcl/rendercontext/State.hxx
@@ -72,7 +72,7 @@ namespace vcl::text
 {
 // Layout flags for Complex Text Layout
 // These are flag values, i.e they can be combined
-enum class ComplexTextLayoutFlags
+enum class ComplexTextLayoutFlags : sal_uInt8
 {
     Default = 0x0000,
     BiDiRtl = 0x0001,
diff --git a/vcl/source/gdi/impglyphitem.cxx b/vcl/source/gdi/impglyphitem.cxx
index 1fdd49756083..0872b22190d0 100644
--- a/vcl/source/gdi/impglyphitem.cxx
+++ b/vcl/source/gdi/impglyphitem.cxx
@@ -492,9 +492,9 @@ SalLayoutGlyphsCache::CachedGlyphsKey::CachedGlyphsKey(
     // That would occasionally lead to rounding errors (at least differences 
that would
     // make checkGlyphsEqual() fail).
     , mapMode(outputDevice->GetMapMode())
-    , rtl(outputDevice->IsRTLEnabled())
-    , layoutMode(outputDevice->GetLayoutMode())
     , digitLanguage(outputDevice->GetDigitLanguage())
+    , layoutMode(outputDevice->GetLayoutMode())
+    , rtl(outputDevice->IsRTLEnabled())
 {
     const LogicalFontInstance* fi = outputDevice->GetFontInstance();
     fi->GetScale(&fontScaleX, &fontScaleY);

Reply via email to