summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qstatictext_p.h
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eblomfel@trolltech.com>2009-08-04 11:41:36 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-01-14 12:48:58 (GMT)
commit4cfca7cf456722ee8659b595f231f3cc2033b80d (patch)
tree696924de1d76bfabf14b5c9f91b9a938ab55983b /src/gui/text/qstatictext_p.h
parentc8621912c17ed15446da2f25760868bc177808c0 (diff)
downloadQt-4cfca7cf456722ee8659b595f231f3cc2033b80d.zip
Qt-4cfca7cf456722ee8659b595f231f3cc2033b80d.tar.gz
Qt-4cfca7cf456722ee8659b595f231f3cc2033b80d.tar.bz2
Speed optimization for QStaticText
Don't use QVector to store the text items, but put them in a regular array for quick access. drawStaticText() is now about 2.7 times the speed of drawText().
Diffstat (limited to 'src/gui/text/qstatictext_p.h')
-rw-r--r--src/gui/text/qstatictext_p.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/text/qstatictext_p.h b/src/gui/text/qstatictext_p.h
index aaaf300..a0d16d4 100644
--- a/src/gui/text/qstatictext_p.h
+++ b/src/gui/text/qstatictext_p.h
@@ -68,7 +68,8 @@ public:
void init();
QAtomicInt ref;
- QVector<QTextItemInt *> items;
+ QTextItemInt *items;
+ int itemCount;
QString text;
QFont font;
char *glyphLayoutMemory;