[Libreoffice-commits] core.git: Branch 'feature/commonsallayout' - vcl/source
Khaled Hosny
khaledhosny at eglug.org
Wed Sep 7 23:41:52 UTC 2016
vcl/source/gdi/CommonSalLayout.cxx | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
New commits:
commit f70bc91c154a9076809599c5a44e05ece5f615b6
Author: Khaled Hosny <khaledhosny at eglug.org>
Date: Wed Sep 7 23:26:14 2016 +0200
Another optimization
Don’t call hb_ot_layout_get_glyph_class() unless the glyph advance width
is zero, as we really do not use its result otherwise.
Change-Id: Id02238abef91b9343931f1886d54d966d7157f25
diff --git a/vcl/source/gdi/CommonSalLayout.cxx b/vcl/source/gdi/CommonSalLayout.cxx
index d84c649..a2a0f3a 100755
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -425,9 +425,8 @@ bool CommonSalLayout::LayoutText(ImplLayoutArgs& rArgs)
if (hb_ot_layout_has_glyph_classes(pHBFace))
{
// the font has GDEF table
- bool bMark = hb_ot_layout_get_glyph_class(pHBFace, nGlyphIndex) == HB_OT_LAYOUT_GLYPH_CLASS_MARK;
- if (bMark && pHbPositions[i].x_advance == 0)
- bDiacritic = true;
+ if (pHbPositions[i].x_advance == 0)
+ bDiacritic = hb_ot_layout_get_glyph_class(pHBFace, nGlyphIndex) == HB_OT_LAYOUT_GLYPH_CLASS_MARK;
}
else
{
More information about the Libreoffice-commits
mailing list