MCPcopy Create free account
hub / github.com/MapServer/MapServer / allocate

Method allocate

renderers/agg/include/agg_span_allocator.h:30–41  ·  view source on GitHub ↗

--------------------------------------------------------------------

Source from the content-addressed store, hash-verified

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(); }

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected