diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-10-10 13:19:00 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-10-11 11:19:10 +0200 |
commit | 6f45c0cf86b21772740bb0cafb3d462b058523f3 (patch) | |
tree | e5ad6dafc77f9ff0233ffcaa61a903d6db7837c0 /include/vcl/metric.hxx | |
parent | 5dff1f3a995a8e78a156214fd9c32b1005337183 (diff) |
cool#7318 Calc rendering acceleration
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 on 64-bit machines, where tools::Long is
64-bit, which is quite unnecessary for FontMetric fields.
Change-Id: I64983d191ba9aeb76671671443ea90f90fd2c401
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157753
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/vcl/metric.hxx')
-rw-r--r-- | include/vcl/metric.hxx | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/include/vcl/metric.hxx b/include/vcl/metric.hxx index 1e03232d70f7..5cf1d6e23246 100644 --- a/include/vcl/metric.hxx +++ b/include/vcl/metric.hxx @@ -40,23 +40,23 @@ public: FontMetric(vcl::font::PhysicalFontFace const& rFace); ~FontMetric() override; - tools::Long GetAscent() const { return mnAscent; } - tools::Long GetDescent() const { return mnDescent; } - tools::Long GetInternalLeading() const { return mnIntLeading; } - tools::Long GetExternalLeading() const { return mnExtLeading; } - tools::Long GetLineHeight() const { return mnLineHeight; } // TODO this is ascent + descnt - tools::Long GetSlant() const { return mnSlant; } - tools::Long GetBulletOffset() const { return mnBulletOffset; } - tools::Long GetHangingBaseline() const { return mnHangingBaseline; } - - void SetAscent( tools::Long nAscent ) { mnAscent = nAscent; } - void SetDescent( tools::Long nDescent ) { mnDescent = nDescent; } - void SetExternalLeading( tools::Long nExtLeading ) { mnExtLeading = nExtLeading; } - void SetInternalLeading( tools::Long nIntLeading ) { mnIntLeading = nIntLeading; } - void SetLineHeight( tools::Long nHeight ) { mnLineHeight = nHeight; } // TODO this is ascent + descent - void SetSlant( tools::Long nSlant ) { mnSlant = nSlant; } - void SetBulletOffset( tools::Long nOffset ) { mnBulletOffset = nOffset; } - void SetHangingBaseline( tools::Long nBaseline ) { mnHangingBaseline = nBaseline; } + sal_Int32 GetAscent() const { return mnAscent; } + sal_Int32 GetDescent() const { return mnDescent; } + sal_Int32 GetInternalLeading() const { return mnIntLeading; } + sal_Int32 GetExternalLeading() const { return mnExtLeading; } + sal_Int32 GetLineHeight() const { return mnLineHeight; } // TODO this is ascent + descnt + sal_Int32 GetSlant() const { return mnSlant; } + sal_Int32 GetBulletOffset() const { return mnBulletOffset; } + sal_Int32 GetHangingBaseline() const { return mnHangingBaseline; } + + void SetAscent( sal_Int32 nAscent ) { mnAscent = nAscent; } + void SetDescent( sal_Int32 nDescent ) { mnDescent = nDescent; } + void SetExternalLeading( sal_Int32 nExtLeading ) { mnExtLeading = nExtLeading; } + void SetInternalLeading( sal_Int32 nIntLeading ) { mnIntLeading = nIntLeading; } + void SetLineHeight( sal_Int32 nHeight ) { mnLineHeight = nHeight; } // TODO this is ascent + descent + void SetSlant( sal_Int32 nSlant ) { mnSlant = nSlant; } + void SetBulletOffset( sal_Int32 nOffset ) { mnBulletOffset = nOffset; } + void SetHangingBaseline( sal_Int32 nBaseline ) { mnHangingBaseline = nBaseline; } bool IsFullstopCentered() const { return mbFullstopCentered; } @@ -77,14 +77,14 @@ public: private: bool EqualNoBase( const FontMetric& ) const; size_t GetHashValueNoBase() const; - tools::Long mnAscent; // Ascent - tools::Long mnDescent; // Descent - tools::Long mnIntLeading; // Internal Leading - tools::Long mnExtLeading; // External Leading - tools::Long mnLineHeight; // Ascent+Descent+EmphasisMark - tools::Long mnSlant; // Slant - tools::Long mnBulletOffset; // Offset for non-printing character - tools::Long mnHangingBaseline; // Offset from Romn baseline to hanging baseline. + sal_Int32 mnAscent; // Ascent + sal_Int32 mnDescent; // Descent + sal_Int32 mnIntLeading; // Internal Leading + sal_Int32 mnExtLeading; // External Leading + sal_Int32 mnLineHeight; // Ascent+Descent+EmphasisMark + sal_Int32 mnSlant; // Slant + sal_Int32 mnBulletOffset; // Offset for non-printing character + sal_Int32 mnHangingBaseline; // Offset from Romn baseline to hanging baseline. bool mbFullstopCentered; }; |