Struct cognitive_qualia::memory::MemoryPool
[−]
[src]
pub struct MemoryPool { /* fields omitted */ }
This structure is used to provide storage for images of different type: shared memory and buffers and return views to them.
Methods
impl MemoryPool
[src]
fn new(memory: Memory) -> Self
Creates new MemoryPool
containing Memory
.
fn get_memory_view(
&self,
format: PixelFormat,
offset: usize,
width: usize,
height: usize,
stride: usize
) -> MemoryView
&self,
format: PixelFormat,
offset: usize,
width: usize,
height: usize,
stride: usize
) -> MemoryView
Returns MemoryView
s from Memory
s stored in MemoryPool
.
fn take_memory(self) -> Option<Memory>
Consumes the pool and if there are no other references to this memory left returns the
Memory
.