src/gui/text/qstatictext_p.h
changeset 33 3e2da88830cd
parent 30 5dc02b23752f
equal deleted inserted replaced
30:5dc02b23752f 33:3e2da88830cd
    51 // without notice, or even be removed.
    51 // without notice, or even be removed.
    52 //
    52 //
    53 // We mean it.
    53 // We mean it.
    54 //
    54 //
    55 
    55 
       
    56 #include "qstatictext.h"
       
    57 
    56 #include <private/qtextureglyphcache_p.h>
    58 #include <private/qtextureglyphcache_p.h>
    57 #include <QtGui/qcolor.h>
    59 #include <QtGui/qcolor.h>
    58 
    60 
    59 QT_BEGIN_NAMESPACE
    61 QT_BEGIN_NAMESPACE
    60 
    62 
    86 
    88 
    87         delete userData;
    89         delete userData;
    88         userData = newUserData;
    90         userData = newUserData;
    89     }
    91     }
    90 
    92 
    91     QFixedPoint *glyphPositions;                 // 8 bytes per glyph
    93     union {
    92     glyph_t *glyphs;                             // 4 bytes per glyph
    94         QFixedPoint *glyphPositions;             // 8 bytes per glyph
    93     const QChar *chars;                          // 2 bytes per glyph
    95         int positionOffset;
       
    96     };
       
    97     union {
       
    98         glyph_t *glyphs;                         // 4 bytes per glyph
       
    99         int glyphOffset;
       
   100     };
       
   101     union {
       
   102         QChar *chars;                            // 2 bytes per glyph
       
   103         int charOffset;
       
   104     };
    94                                                  // =================
   105                                                  // =================
    95                                                  // 14 bytes per glyph
   106                                                  // 14 bytes per glyph
    96 
   107 
    97                                                  // 12 bytes for pointers
   108                                                  // 12 bytes for pointers
    98     int numGlyphs;                               // 4 bytes per item
   109     int numGlyphs;                               // 4 bytes per item
   132     QPointF position;                    // 16 bytes per text
   143     QPointF position;                    // 16 bytes per text
   133 
   144 
   134     QTransform matrix;                   // 80 bytes per text
   145     QTransform matrix;                   // 80 bytes per text
   135     QStaticTextItem *items;              // 4 bytes per text
   146     QStaticTextItem *items;              // 4 bytes per text
   136     int itemCount;                       // 4 bytes per text
   147     int itemCount;                       // 4 bytes per text
       
   148 
   137     glyph_t *glyphPool;                  // 4 bytes per text
   149     glyph_t *glyphPool;                  // 4 bytes per text
   138     QFixedPoint *positionPool;           // 4 bytes per text
   150     QFixedPoint *positionPool;           // 4 bytes per text
       
   151     QChar *charPool;                     // 4 bytes per text
   139 
   152 
   140     unsigned char needsRelayout : 1;
   153     QTextOption textOption;              // 28 bytes per text
   141     unsigned char useBackendOptimizations : 1; // 1 byte per text
   154 
   142     unsigned char textFormat              : 2;
   155     unsigned char needsRelayout            : 1; // 1 byte per text
       
   156     unsigned char useBackendOptimizations  : 1;
       
   157     unsigned char textFormat               : 2;
       
   158     unsigned char untransformedCoordinates : 1;
   143                                          // ================
   159                                          // ================
   144                                          // 163 bytes per text
   160                                          // 195 bytes per text
   145 
   161 
   146     static QStaticTextPrivate *get(const QStaticText *q);
   162     static QStaticTextPrivate *get(const QStaticText *q);
   147 };
   163 };
   148 
   164 
   149 QT_END_NAMESPACE
   165 QT_END_NAMESPACE