Skip to main content

DecodedSurface

Trait DecodedSurface 

Source
pub trait DecodedSurface: 'static {
    // Required methods
    fn dimensions(&self) -> FrameDimensions;
    fn pixel_format(&self) -> PixelFormat;
}
Expand description

A decoded platform surface retained from the operating system or browser.

Desktop surface implementations are Send + Sync. Browser VideoFrame objects and some mobile image leases are intentionally thread-local, so cross-thread applications should add Send + Sync to their own generic bounds when they require it.

Required Methods§

Source

fn dimensions(&self) -> FrameDimensions

Visible frame dimensions.

Source

fn pixel_format(&self) -> PixelFormat

Pixel format of the retained surface.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§