diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2009-12-09 13:23:02 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-01-14 13:07:11 (GMT) |
commit | eb674a7ff5fad2f4a76e3b20873c574eb8a6135f (patch) | |
tree | 958d115a90d12410aec322fcb5a55d2cebeb08ba /src/gui/text/qstatictext_p.h | |
parent | a9e08c091c822e65ae8453581c6fee4b94001682 (diff) | |
download | Qt-eb674a7ff5fad2f4a76e3b20873c574eb8a6135f.zip Qt-eb674a7ff5fad2f4a76e3b20873c574eb8a6135f.tar.gz Qt-eb674a7ff5fad2f4a76e3b20873c574eb8a6135f.tar.bz2 |
Optimize drawStaticText() with rectangle destination
In order to be feature consistent with drawText(), we have to clip the
text whenever the text expands beyond its borders. This is a
performance hit, but luckily we can detect the cases where it's
necessary before-hand.
Diffstat (limited to 'src/gui/text/qstatictext_p.h')
-rw-r--r-- | src/gui/text/qstatictext_p.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/text/qstatictext_p.h b/src/gui/text/qstatictext_p.h index 4756773..0677920 100644 --- a/src/gui/text/qstatictext_p.h +++ b/src/gui/text/qstatictext_p.h @@ -62,7 +62,6 @@ class Q_GUI_EXPORT QStaticTextItem public: QStaticTextItem() : chars(0), numChars(0), fontEngine(0) {} - // ### Use constant length arrays here to minimize memory consumption QFixedPoint *glyphPositions; // 8 bytes per glyph glyph_t *glyphs; // 4 bytes per glyph const QChar *chars; // 2 bytes per glyph @@ -98,6 +97,8 @@ public: int itemCount; // 4 bytes per text glyph_t *glyphPool; // 4 bytes per text QFixedPoint *positionPool; // 4 bytes per text + + char needsClipRect : 1; // 1 byte per text // ================ // 144 bytes per text |