diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2010-07-09 11:33:56 +1000 |
---|---|---|
committer | Jiang Jiang <jiang.jiang@nokia.com> | 2011-07-11 17:05:08 +0200 |
commit | c4b5e186c7718f0a03d6ed529f546e7debfbcf86 (patch) | |
tree | 3de762ea436040350b938ad5e872e6231be865b6 /doc/src/snippets/code/doc_src_qalgorithms.cpp | |
parent | 0b996f435fb0da42e4f563986ef8214d542398f4 (diff) | |
download | qt4-tools-c4b5e186c7718f0a03d6ed529f546e7debfbcf86.tar.gz |
Optimize text layout.
When laying out text, a significant amount of time was being spent
querying for the font engine. This patch:
* changes the layout to only query for the engine when a new script item
is encountered.
* adds an internal cache of the previous result to
QTextEngine::fontEngine(). This catches the important case of multiline
text with few font engine changes.
With these changes layout costs are now approximately 60% of what they
were previously, as measured by the text layout benchmarks.
Reviewed-by: Eskil Abrahamsen Blomfeldt
(cherry picked from commit 0c56bef89b6e3fe4c9fb32eb8b51a6ea316a89fa)
Diffstat (limited to 'doc/src/snippets/code/doc_src_qalgorithms.cpp')
0 files changed, 0 insertions, 0 deletions