Skip to main content

ExternalTextureLease

Trait ExternalTextureLease 

Source
pub trait ExternalTextureLease:
    Debug
    + Send
    + Sync
    + 'static {
    // Required method
    fn retained_bytes(&self) -> u64;

    // Provided methods
    fn prepare_submission(&self) -> bool { ... }
    fn flush_submission(&self) -> Result<(), RenderError> { ... }
    fn submitted(&self) { ... }
    fn staged_signals(&self) -> usize { ... }
}
Expand description

Keeps an imported native texture and its decoder surface alive until the submission that samples it completes.

Required Methods§

Source

fn retained_bytes(&self) -> u64

Approximate native allocation bytes retained by this lease.

Provided Methods§

Source

fn prepare_submission(&self) -> bool

Stages native waits or signals on the renderer’s next queue submission.

Source

fn flush_submission(&self) -> Result<(), RenderError>

Flushes native work staged by prepare_submission.

§Errors

The frame’s error, normally RenderError::ExternalTextureSync.

Source

fn submitted(&self)

Called right after the command buffer using the resource is submitted.

Source

fn staged_signals(&self) -> usize

Native signals already staged on the renderer’s queue.

Staging is cleared when its submission completes, so a nonzero count when the next frame stages means a leaked signal. Read only by a debug assertion.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§