--------------------------------------------------------------------
| 28 | |
| 29 | //-------------------------------------------------------------------- |
| 30 | AGG_INLINE color_type* allocate(unsigned span_len) |
| 31 | { |
| 32 | if(span_len > m_span.size()) |
| 33 | { |
| 34 | // To reduce the number of reallocs we align the |
| 35 | // span_len to 256 color elements. |
| 36 | // Well, I just like this number and it looks reasonable. |
| 37 | //----------------------- |
| 38 | m_span.resize(((span_len + 255) >> 8) << 8); |
| 39 | } |
| 40 | return &m_span[0]; |
| 41 | } |
| 42 | |
| 43 | AGG_INLINE color_type* span() { return &m_span[0]; } |
| 44 | AGG_INLINE unsigned max_span_len() const { return m_span.size(); } |