From a5614264d5a5d6d1cc0f2773f4d7cd70195a0546 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Thu, 30 Jan 2014 05:46:35 +0200 Subject: Get rid of QGlyphLayout::advances_y ...and thus consume 4 bytes less per glyph and increase the performance a bit. It seems, the only CTFontGetAdvancesForGlyphs() returns both x and y advances, though y advances are always equal to 0 for horizontal orientation and x advances are always equal to 0 for vertical orientation. Also, rename `advances_x` to `advances` for consistency and declare QGlyphLayout's data size in a single place. Change-Id: I56b20f893f8a6feb7aa870e3edbca99dd93ba2e2 Reviewed-by: Eskil Abrahamsen Blomfeldt Reviewed-by: Lars Knoll Reviewed-by: Simon Hausmann --- src/gui/text/qfontengine_qpa.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/gui/text/qfontengine_qpa.cpp') diff --git a/src/gui/text/qfontengine_qpa.cpp b/src/gui/text/qfontengine_qpa.cpp index 28b95bd509..46f9071f07 100644 --- a/src/gui/text/qfontengine_qpa.cpp +++ b/src/gui/text/qfontengine_qpa.cpp @@ -399,8 +399,7 @@ void QFontEngineQPA::recalcAdvances(QGlyphLayout *glyphs, QFontEngine::ShaperFla glyphs->glyphs[i] = 0; continue; } - glyphs->advances_x[i] = g->advance; - glyphs->advances_y[i] = 0; + glyphs->advances[i] = g->advance; } } -- cgit v1.2.3