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§
Sourcefn retained_bytes(&self) -> u64
fn retained_bytes(&self) -> u64
Approximate native allocation bytes retained by this lease.
Provided Methods§
Sourcefn prepare_submission(&self) -> bool
fn prepare_submission(&self) -> bool
Stages native waits or signals on the renderer’s next queue submission.
Sourcefn flush_submission(&self) -> Result<(), RenderError>
fn flush_submission(&self) -> Result<(), RenderError>
Flushes native work staged by prepare_submission.
§Errors
The frame’s error, normally RenderError::ExternalTextureSync.
Sourcefn staged_signals(&self) -> usize
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".