struct
TextGeometry::TemporaryBuffer
Stores per-thread memory buffers used to reduce memory allocation.
Public
Constructors
TemporaryBuffer
TemporaryBuffer()
Methods
~TemporaryBuffer
~TemporaryBuffer()
AllocWord
u32 AllocWord(bool spacer)
Allocates a new word and adds it to the buffer.
Returns index of the word in the word buffer.
- spacer
- Specify true if the word is only to contain spaces. (Spaces are considered a special type of word).
AllocLine
u32 AllocLine(TextGeometry *textData)
Allocates a new line and adds it to the buffer.
Returns index of the line in the line buffer.
AddCharToPage
Increments the count of characters for the referenced page, and optionally creates page info if it doesn't already exist.
DeallocAll
void DeallocAll()
Resets all allocation counters, but doesn't actually release memory.