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

void AddCharToPage(u32 page, const FontBitmapInformation &fontData)

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.

Fields

WordBuffer

Word * WordBuffer

WordBufferSize

u32 WordBufferSize

NextFreeWord

u32 NextFreeWord

LineBuffer

Line * LineBuffer

LineBufferSize

u32 LineBufferSize

NextFreeLine

u32 NextFreeLine

PageBuffer

PageInfo * PageBuffer

PageBufferSize

u32 PageBufferSize

NextFreePageInfo

u32 NextFreePageInfo