BufferPool::AllocationOptions Struct Reference

Contains options to configure the allocation when requesting an image buffer from a buffer pool. More...

Public Attributes

size_t  alignment

Specifies the alignment of the address of the buffer's memory.

ptrdiff_t  pitch

Specifies the pitch to use when allocating the buffer.

size_t  buffer_size

Overrides the automatic buffer size calculation.

Detailed Description

Contains options to configure the allocation when requesting an image buffer from a buffer pool.

See also
BufferPool::getBuffer

Member Data Documentation

◆ alignment

size_t alignment

Specifies the alignment of the address of the buffer's memory.

Setting this to 0 lets the buffer pool select an alignment automatically.

The alignment must be a power of 2.

◆ buffer_size

size_t buffer_size

Overrides the automatic buffer size calculation.

A value of 0 lets the buffer pool calculate the required buffer size automatically.

Setting a size that is smaller than the amount of memory required to store an image of a known format will lead to an error.

◆ pitch

ptrdiff_t pitch

Specifies the pitch to use when allocating the buffer.

A value of 0 lets the buffer pool select a pitch automatically.

Setting a pitch that is smaller than the amount of memory required to store one line of image data will lead to an error.