pub struct PooledFrameLease { /* private fields */ }Expand description
RAII lease holding exclusive mutable access to a pooled RGBA8 buffer slot, returning it on drop or fence commit.
Implementations§
Source§impl PooledFrameLease
Buffer access, fence-gated submission, and explicit release for PooledFrameLease.
impl PooledFrameLease
Buffer access, fence-gated submission, and explicit release for PooledFrameLease.
Sourcepub fn set_dimensions(&mut self, width: u32, height: u32)
pub fn set_dimensions(&mut self, width: u32, height: u32)
Updates recorded pixel dimensions after a renderer writes into get_mut_pixels().
§Arguments
&Self- Mutable frame lease.u32- Actual rendered width in pixels.u32- Actual rendered height in pixels.
Sourcepub fn to_image_buffer_copy(&self) -> ImageBuffer
pub fn to_image_buffer_copy(&self) -> ImageBuffer
Sourcepub fn submit_in_flight(self)
pub fn submit_in_flight(self)
Returns the pixel buffer to its pool slot while keeping the slot marked in_flight until RenderBufferPool::retire_fence(fence_id) completes.
§Arguments
Self- Consumed frame lease.
Sourcepub fn release_now(self)
pub fn release_now(self)
Returns the pixel buffer to its pool slot and immediately marks the slot free for reuse.
§Arguments
Self- Consumed frame lease.
Source§impl PooledFrameLease
impl PooledFrameLease
pub fn get_slot_index(&self) -> usize
pub fn get_mut_slot_index(&mut self) -> &mut usize
pub fn set_slot_index(&mut self, val: usize) -> &mut Self
pub fn get_width(&self) -> u32
pub fn get_mut_width(&mut self) -> &mut u32
pub fn set_width(&mut self, val: u32) -> &mut Self
pub fn get_height(&self) -> u32
pub fn get_mut_height(&mut self) -> &mut u32
pub fn set_height(&mut self, val: u32) -> &mut Self
pub fn get_fence_id(&self) -> u64
pub fn get_mut_fence_id(&mut self) -> &mut u64
pub fn set_fence_id(&mut self, val: u64) -> &mut Self
pub fn get_generation(&self) -> u64
pub fn get_mut_generation(&mut self) -> &mut u64
pub fn set_generation(&mut self, val: u64) -> &mut Self
pub fn get_pixels(&self) -> &Vec<u8> ⓘ
pub fn get_mut_pixels(&mut self) -> &mut Vec<u8> ⓘ
pub fn set_pixels(&mut self, val: Vec<u8>) -> &mut Self
pub fn get_released(&self) -> bool
pub fn get_mut_released(&mut self) -> &mut bool
pub fn set_released(&mut self, val: bool) -> &mut Self
Trait Implementations§
Source§impl Debug for PooledFrameLease
impl Debug for PooledFrameLease
Auto Trait Implementations§
impl !RefUnwindSafe for PooledFrameLease
impl !Send for PooledFrameLease
impl !Sync for PooledFrameLease
impl !UnwindSafe for PooledFrameLease
impl Forget for PooledFrameLease
impl Freeze for PooledFrameLease
impl Move for PooledFrameLease
impl Unpin for PooledFrameLease
impl UnsafeUnpin for PooledFrameLeasewhere
*const RcInner<RefCell<RenderBufferPoolState>> is !null: UnsafeUnpin,
PhantomData<RcInner<RefCell<RenderBufferPoolState>>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
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