summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpaintengine_raster_p.h
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eblomfel@trolltech.com>2009-08-17 11:09:51 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-01-14 12:54:04 (GMT)
commit91e96d6c730aac4accef64e5eaab1b289939ef8e (patch)
tree23a5303b53c29f3ec0ec24fccff176ef76fdc1f0 /src/gui/painting/qpaintengine_raster_p.h
parent49dfc4ed6a89cdd7377e4b88236bb7303fdfdc15 (diff)
downloadQt-91e96d6c730aac4accef64e5eaab1b289939ef8e.zip
Qt-91e96d6c730aac4accef64e5eaab1b289939ef8e.tar.gz
Qt-91e96d6c730aac4accef64e5eaab1b289939ef8e.tar.bz2
Optimize QStaticText for space
By caching the results of getGlyphPositions() we can make a code path in the critical paint engines which is optimal both in space and speed. The engines where speed is of less importance (pdf engine etc.) which may need more information, we choose the slower code path of drawText() which lays out the text again. We should have optimal paths in raster, vg and GL2 paint engines. The others are less important. Memory consumption of static text is now 14 bytes per glyph, 8 bytes per item and a static overhead of 40 bytes per QStaticText object.
Diffstat (limited to 'src/gui/painting/qpaintengine_raster_p.h')
-rw-r--r--src/gui/painting/qpaintengine_raster_p.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/painting/qpaintengine_raster_p.h b/src/gui/painting/qpaintengine_raster_p.h
index b937f66..0250c3d 100644
--- a/src/gui/painting/qpaintengine_raster_p.h
+++ b/src/gui/painting/qpaintengine_raster_p.h
@@ -257,7 +257,12 @@ private:
void fillRect(const QRectF &rect, QSpanData *data);
void drawBitmap(const QPointF &pos, const QImage &image, QSpanData *fill);
- void drawCachedGlyphs(const QPointF &p, const QTextItemInt &ti);
+ void drawCachedGlyphs(const QVarLengthArray<glyph_t> &glyphs,
+ const QVarLengthArray<QFixedPoint> &positions,
+ QFontEngine *fontEngine,
+ const QTransform &matrix);
+
+ void drawStaticTextItem(const QPointF &p, QStaticTextItem *textItem);
#if defined(Q_OS_SYMBIAN) && defined(QT_NO_FREETYPE)
void drawGlyphsS60(const QPointF &p, const QTextItemInt &ti);