diff options
author | Konstantin Ritt <ritt.ks@gmail.com> | 2014-02-11 02:50:30 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-03 11:10:56 +0100 |
commit | fd498ad1c0f331a42b8c9ee18f5bb48647d13df1 (patch) | |
tree | 22fbd05daee749898062b697194c8912714aa573 /src/gui/text/qtextengine_p.h | |
parent | 25e34dadabe844099885045c0e53c8136508698a (diff) |
Make QGlyphLayout consume one byte less per glyph
Change-Id: Iddcc2e1f284dcf13ae98b57ea2d5854e57c83530
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/gui/text/qtextengine_p.h')
-rw-r--r-- | src/gui/text/qtextengine_p.h | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/src/gui/text/qtextengine_p.h b/src/gui/text/qtextengine_p.h index 06075eb992..342a94de66 100644 --- a/src/gui/text/qtextengine_p.h +++ b/src/gui/text/qtextengine_p.h @@ -89,21 +89,6 @@ class QAbstractTextDocumentLayout; typedef quint32 glyph_t; -#ifdef __xlC__ -typedef unsigned q_hb_bitfield; -#else -typedef quint8 q_hb_bitfield; -#endif - -struct QGlyphAttributes { - q_hb_bitfield justification :4; - q_hb_bitfield clusterStart :1; - q_hb_bitfield unused1 :1; - q_hb_bitfield unused2 :1; - q_hb_bitfield dontPrint :1; - q_hb_bitfield unused3 :8; -}; - // this uses the same coordinate system as Qt, but a different one to freetype. // * y is usually negative, and is equal to the ascent. // * negative yoff means the following stuff is drawn higher up. @@ -174,6 +159,14 @@ struct QGlyphJustification }; Q_DECLARE_TYPEINFO(QGlyphJustification, Q_PRIMITIVE_TYPE); +struct QGlyphAttributes { + uchar clusterStart : 1; + uchar dontPrint : 1; + uchar justification : 4; + uchar reserved : 2; +}; +Q_STATIC_ASSERT(sizeof(QGlyphAttributes) == 1); + struct QGlyphLayout { enum { @@ -186,7 +179,7 @@ struct QGlyphLayout glyph_t *glyphs; // 4 bytes per element QFixed *advances; // 4 bytes per element QGlyphJustification *justifications; // 4 bytes per element - QGlyphAttributes *attributes; // 2 bytes per element + QGlyphAttributes *attributes; // 1 byte per element int numGlyphs; |