diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-03-04 07:34:14 -0600 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-03-04 21:12:47 -0600 |
commit | 6bb68cae7c31918eff8386d5b52be0759386bb60 (patch) | |
tree | a2ef9bbfb9d547d522c3b0e4e730ac5640c38b3c /vcl/inc | |
parent | 43f3b1fb5bca9909a6ca2102b80dc3291e038f2f (diff) |
GenericSalLayout: manage the collection of GlyphItem with a vector.
There was a TODO to replace a manually managed array of Glyphs
to use std::list
a GlyphItem is 36 bytes long. the colleciton of GlyphItems is
mostly used in a sequential access. random insert/delete are fairly rare.
using std::list would increase the size by at least 8 to 16 bytes per
element (depending on the size of void*) (25 to 50% overhead)
and would greatly degrade data locality for most iterations loops.
so std::vector seems more appropriate here.
Diffstat (limited to 'vcl/inc')
-rw-r--r-- | vcl/inc/sallayout.hxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx index 51a64155f75e..a9a30d03f7e8 100644 --- a/vcl/inc/sallayout.hxx +++ b/vcl/inc/sallayout.hxx @@ -374,9 +374,7 @@ protected: bool GetCharWidths( sal_Int32* pCharWidths ) const; private: - GlyphItem* mpGlyphItems; // TODO: change to GlyphList - int mnGlyphCount; - int mnGlyphCapacity; + GlyphVector m_GlyphItems; mutable Point maBasePoint; // enforce proper copy semantic |