pub struct RenderBufferPool { /* private fields */ }Expand description
Zero-allocation bounded CPU RGBA8 render output buffer pool with fence-gated reclamation.
Implementations§
Source§impl RenderBufferPool
Bounded zero-allocation buffer pooling and fence-gated release for RenderBufferPool.
impl RenderBufferPool
Bounded zero-allocation buffer pooling and fence-gated release for RenderBufferPool.
Sourcepub fn with_capacity(slot_count: usize) -> Self
pub fn with_capacity(slot_count: usize) -> Self
Sourcepub fn preallocate(&self, width: u32, height: u32)
pub fn preallocate(&self, width: u32, height: u32)
Pre-allocates backing storage for all slots for a (width, height) RGBA8 framebuffer so steady-state renders allocate zero bytes.
§Arguments
&Self- Pool reference.u32- Framebuffer width in pixels.u32- Framebuffer height in pixels.
Sourcepub fn acquire(
&self,
width: u32,
height: u32,
fence_id: u64,
) -> Option<PooledFrameLease>
pub fn acquire( &self, width: u32, height: u32, fence_id: u64, ) -> Option<PooledFrameLease>
Acquires a free buffer slot sized for (width, height) RGBA8 output tagged with fence_id.
Returns None when all bounded slots are still in flight (enforcing strict memory backpressure).
§Arguments
&Self- Pool reference.u32- Target framebuffer width in pixels.u32- Target framebuffer height in pixels.u64- Fence value guarding reclamation of this frame.
§Returns
Option<PooledFrameLease>- Exclusive RAII buffer lease, orNoneunder backpressure.
Sourcepub fn retire_fence(&self, completed_fence: u64) -> usize
pub fn retire_fence(&self, completed_fence: u64) -> usize
Sourcepub fn stats(&self) -> RenderBufferPoolStats
pub fn stats(&self) -> RenderBufferPoolStats
Trait Implementations§
Source§impl Clone for RenderBufferPool
impl Clone for RenderBufferPool
Source§impl Debug for RenderBufferPool
impl Debug for RenderBufferPool
Auto Trait Implementations§
impl !RefUnwindSafe for RenderBufferPool
impl !Send for RenderBufferPool
impl !Sync for RenderBufferPool
impl !UnwindSafe for RenderBufferPool
impl Forget for RenderBufferPool
impl Freeze for RenderBufferPool
impl Move for RenderBufferPool
impl Unpin for RenderBufferPool
impl UnsafeUnpin for RenderBufferPoolwhere
*const RcInner<RefCell<RenderBufferPoolState>> is !null: UnsafeUnpin,
PhantomData<RcInner<RefCell<RenderBufferPoolState>>>: 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