src/gui/text/qstatictext_p.h
changeset 33 3e2da88830cd
parent 30 5dc02b23752f
--- a/src/gui/text/qstatictext_p.h	Tue Jul 06 15:10:48 2010 +0300
+++ b/src/gui/text/qstatictext_p.h	Wed Aug 18 10:37:55 2010 +0300
@@ -53,6 +53,8 @@
 // We mean it.
 //
 
+#include "qstatictext.h"
+
 #include <private/qtextureglyphcache_p.h>
 #include <QtGui/qcolor.h>
 
@@ -88,9 +90,18 @@
         userData = newUserData;
     }
 
-    QFixedPoint *glyphPositions;                 // 8 bytes per glyph
-    glyph_t *glyphs;                             // 4 bytes per glyph
-    const QChar *chars;                          // 2 bytes per glyph
+    union {
+        QFixedPoint *glyphPositions;             // 8 bytes per glyph
+        int positionOffset;
+    };
+    union {
+        glyph_t *glyphs;                         // 4 bytes per glyph
+        int glyphOffset;
+    };
+    union {
+        QChar *chars;                            // 2 bytes per glyph
+        int charOffset;
+    };
                                                  // =================
                                                  // 14 bytes per glyph
 
@@ -134,14 +145,19 @@
     QTransform matrix;                   // 80 bytes per text
     QStaticTextItem *items;              // 4 bytes per text
     int itemCount;                       // 4 bytes per text
+
     glyph_t *glyphPool;                  // 4 bytes per text
     QFixedPoint *positionPool;           // 4 bytes per text
+    QChar *charPool;                     // 4 bytes per text
 
-    unsigned char needsRelayout : 1;
-    unsigned char useBackendOptimizations : 1; // 1 byte per text
-    unsigned char textFormat              : 2;
+    QTextOption textOption;              // 28 bytes per text
+
+    unsigned char needsRelayout            : 1; // 1 byte per text
+    unsigned char useBackendOptimizations  : 1;
+    unsigned char textFormat               : 2;
+    unsigned char untransformedCoordinates : 1;
                                          // ================
-                                         // 163 bytes per text
+                                         // 195 bytes per text
 
     static QStaticTextPrivate *get(const QStaticText *q);
 };