pub struct RutabagaGralloc { /* private fields */ }
Expand description
A container for a variety of allocation backends.
Implementations§
Source§impl RutabagaGralloc
impl RutabagaGralloc
Sourcepub fn new() -> RutabagaResult<RutabagaGralloc>
pub fn new() -> RutabagaResult<RutabagaGralloc>
Returns a new RutabagaGralloc instance upon success. All allocation backends that have been built are initialized. The default system allocator is always initialized.
Sourcepub fn supports_external_gpu_memory(&self) -> bool
pub fn supports_external_gpu_memory(&self) -> bool
Returns true if one of the allocation backends supports GPU external memory.
Sourcepub fn supports_dmabuf(&self) -> bool
pub fn supports_dmabuf(&self) -> bool
Returns true if one of the allocation backends supports dma_buf.
Sourcepub fn get_image_memory_requirements(
&mut self,
info: ImageAllocationInfo,
) -> RutabagaResult<ImageMemoryRequirements>
pub fn get_image_memory_requirements( &mut self, info: ImageAllocationInfo, ) -> RutabagaResult<ImageMemoryRequirements>
Returns a image memory requirements for the given info
upon success.
Sourcepub fn allocate_memory(
&mut self,
reqs: ImageMemoryRequirements,
) -> RutabagaResult<RutabagaHandle>
pub fn allocate_memory( &mut self, reqs: ImageMemoryRequirements, ) -> RutabagaResult<RutabagaHandle>
Allocates memory given the particular reqs
upon success.
Sourcepub fn import_and_map(
&mut self,
handle: RutabagaHandle,
vulkan_info: VulkanInfo,
size: u64,
) -> RutabagaResult<Box<dyn MappedRegion>>
pub fn import_and_map( &mut self, handle: RutabagaHandle, vulkan_info: VulkanInfo, size: u64, ) -> RutabagaResult<Box<dyn MappedRegion>>
Imports the handle
using the given vulkan_info
. Returns a mapping using Vulkano upon
success. Should not be used with minigbm or system gralloc backends.
Auto Trait Implementations§
impl Freeze for RutabagaGralloc
impl !RefUnwindSafe for RutabagaGralloc
impl Send for RutabagaGralloc
impl !Sync for RutabagaGralloc
impl Unpin for RutabagaGralloc
impl !UnwindSafe for RutabagaGralloc
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more