pub trait TileBatchDecodeDevice: ImageCodec {
type Context: CodecContext;
type DeviceSurface: DeviceSurface;
// Provided methods
fn decode_tile_to_device<'a>(
ctx: &mut DecoderContext<Self::Context>,
pool: &mut Self::Pool,
input: &'a [u8],
fmt: PixelFormat,
backend: BackendRequest,
) -> Result<Self::DeviceSurface, Self::Error>
where Self: TileBatchDecodeSubmit<Context = Self::Context, DeviceSurface = Self::DeviceSurface> { ... }
fn decode_tile_region_to_device<'a>(
ctx: &mut DecoderContext<Self::Context>,
pool: &mut Self::Pool,
input: &'a [u8],
fmt: PixelFormat,
roi: Rect,
backend: BackendRequest,
) -> Result<Self::DeviceSurface, Self::Error>
where Self: TileBatchDecodeSubmit<Context = Self::Context, DeviceSurface = Self::DeviceSurface> { ... }
fn decode_tile_scaled_to_device<'a>(
ctx: &mut DecoderContext<Self::Context>,
pool: &mut Self::Pool,
input: &'a [u8],
fmt: PixelFormat,
scale: Downscale,
backend: BackendRequest,
) -> Result<Self::DeviceSurface, Self::Error>
where Self: TileBatchDecodeSubmit<Context = Self::Context, DeviceSurface = Self::DeviceSurface> { ... }
fn decode_tile_region_scaled_to_device<'a>(
ctx: &mut DecoderContext<Self::Context>,
pool: &mut Self::Pool,
input: &'a [u8],
fmt: PixelFormat,
roi: Rect,
scale: Downscale,
backend: BackendRequest,
) -> Result<Self::DeviceSurface, Self::Error>
where Self: TileBatchDecodeSubmit<Context = Self::Context, DeviceSurface = Self::DeviceSurface> { ... }
}Expand description
Tile-batch helpers that return synchronous device surfaces.
Required Associated Types§
Sourcetype Context: CodecContext
type Context: CodecContext
Codec-specific context cached across tiles.
Sourcetype DeviceSurface: DeviceSurface
type DeviceSurface: DeviceSurface
Device surface returned by decode calls.
Provided Methods§
Sourcefn decode_tile_to_device<'a>(
ctx: &mut DecoderContext<Self::Context>,
pool: &mut Self::Pool,
input: &'a [u8],
fmt: PixelFormat,
backend: BackendRequest,
) -> Result<Self::DeviceSurface, Self::Error>
fn decode_tile_to_device<'a>( ctx: &mut DecoderContext<Self::Context>, pool: &mut Self::Pool, input: &'a [u8], fmt: PixelFormat, backend: BackendRequest, ) -> Result<Self::DeviceSurface, Self::Error>
Decode one tile to the requested backend.
Sourcefn decode_tile_region_to_device<'a>(
ctx: &mut DecoderContext<Self::Context>,
pool: &mut Self::Pool,
input: &'a [u8],
fmt: PixelFormat,
roi: Rect,
backend: BackendRequest,
) -> Result<Self::DeviceSurface, Self::Error>
fn decode_tile_region_to_device<'a>( ctx: &mut DecoderContext<Self::Context>, pool: &mut Self::Pool, input: &'a [u8], fmt: PixelFormat, roi: Rect, backend: BackendRequest, ) -> Result<Self::DeviceSurface, Self::Error>
Decode one tile region to the requested backend.
Sourcefn decode_tile_scaled_to_device<'a>(
ctx: &mut DecoderContext<Self::Context>,
pool: &mut Self::Pool,
input: &'a [u8],
fmt: PixelFormat,
scale: Downscale,
backend: BackendRequest,
) -> Result<Self::DeviceSurface, Self::Error>
fn decode_tile_scaled_to_device<'a>( ctx: &mut DecoderContext<Self::Context>, pool: &mut Self::Pool, input: &'a [u8], fmt: PixelFormat, scale: Downscale, backend: BackendRequest, ) -> Result<Self::DeviceSurface, Self::Error>
Decode one tile at reduced resolution to the requested backend.
Sourcefn decode_tile_region_scaled_to_device<'a>(
ctx: &mut DecoderContext<Self::Context>,
pool: &mut Self::Pool,
input: &'a [u8],
fmt: PixelFormat,
roi: Rect,
scale: Downscale,
backend: BackendRequest,
) -> Result<Self::DeviceSurface, Self::Error>
fn decode_tile_region_scaled_to_device<'a>( ctx: &mut DecoderContext<Self::Context>, pool: &mut Self::Pool, input: &'a [u8], fmt: PixelFormat, roi: Rect, scale: Downscale, backend: BackendRequest, ) -> Result<Self::DeviceSurface, Self::Error>
Decode one tile region at reduced resolution to the requested backend.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".