pub trait TileBatchDecodeDevice: ImageCodec {
type Context: CodecContext;
type DeviceSurface: DeviceSurface;
// Provided methods
fn decode_tile_to_device(
ctx: &mut DecoderContext<<Self as TileBatchDecodeDevice>::Context>,
pool: &mut Self::Pool,
input: &[u8],
fmt: PixelFormat,
backend: BackendRequest,
) -> Result<<Self as TileBatchDecodeDevice>::DeviceSurface, Self::Error>
where Self: TileBatchDecodeSubmit<Context = <Self as TileBatchDecodeDevice>::Context, DeviceSurface = <Self as TileBatchDecodeDevice>::DeviceSurface> { ... }
fn decode_tile_region_to_device(
ctx: &mut DecoderContext<<Self as TileBatchDecodeDevice>::Context>,
pool: &mut Self::Pool,
input: &[u8],
fmt: PixelFormat,
roi: Rect,
backend: BackendRequest,
) -> Result<<Self as TileBatchDecodeDevice>::DeviceSurface, Self::Error>
where Self: TileBatchDecodeSubmit<Context = <Self as TileBatchDecodeDevice>::Context, DeviceSurface = <Self as TileBatchDecodeDevice>::DeviceSurface> { ... }
fn decode_tile_scaled_to_device(
ctx: &mut DecoderContext<<Self as TileBatchDecodeDevice>::Context>,
pool: &mut Self::Pool,
input: &[u8],
fmt: PixelFormat,
scale: Downscale,
backend: BackendRequest,
) -> Result<<Self as TileBatchDecodeDevice>::DeviceSurface, Self::Error>
where Self: TileBatchDecodeSubmit<Context = <Self as TileBatchDecodeDevice>::Context, DeviceSurface = <Self as TileBatchDecodeDevice>::DeviceSurface> { ... }
fn decode_tile_region_scaled_to_device(
ctx: &mut DecoderContext<<Self as TileBatchDecodeDevice>::Context>,
pool: &mut Self::Pool,
input: &[u8],
fmt: PixelFormat,
roi: Rect,
scale: Downscale,
backend: BackendRequest,
) -> Result<<Self as TileBatchDecodeDevice>::DeviceSurface, Self::Error>
where Self: TileBatchDecodeSubmit<Context = <Self as TileBatchDecodeDevice>::Context, DeviceSurface = <Self as TileBatchDecodeDevice>::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(
ctx: &mut DecoderContext<<Self as TileBatchDecodeDevice>::Context>,
pool: &mut Self::Pool,
input: &[u8],
fmt: PixelFormat,
backend: BackendRequest,
) -> Result<<Self as TileBatchDecodeDevice>::DeviceSurface, Self::Error>where
Self: TileBatchDecodeSubmit<Context = <Self as TileBatchDecodeDevice>::Context, DeviceSurface = <Self as TileBatchDecodeDevice>::DeviceSurface>,
fn decode_tile_to_device(
ctx: &mut DecoderContext<<Self as TileBatchDecodeDevice>::Context>,
pool: &mut Self::Pool,
input: &[u8],
fmt: PixelFormat,
backend: BackendRequest,
) -> Result<<Self as TileBatchDecodeDevice>::DeviceSurface, Self::Error>where
Self: TileBatchDecodeSubmit<Context = <Self as TileBatchDecodeDevice>::Context, DeviceSurface = <Self as TileBatchDecodeDevice>::DeviceSurface>,
Decode one tile to the requested backend.
§Errors
Returns the codec-specific ImageCodec::Error if the tile cannot be submitted or device
execution fails.
Sourcefn decode_tile_region_to_device(
ctx: &mut DecoderContext<<Self as TileBatchDecodeDevice>::Context>,
pool: &mut Self::Pool,
input: &[u8],
fmt: PixelFormat,
roi: Rect,
backend: BackendRequest,
) -> Result<<Self as TileBatchDecodeDevice>::DeviceSurface, Self::Error>where
Self: TileBatchDecodeSubmit<Context = <Self as TileBatchDecodeDevice>::Context, DeviceSurface = <Self as TileBatchDecodeDevice>::DeviceSurface>,
fn decode_tile_region_to_device(
ctx: &mut DecoderContext<<Self as TileBatchDecodeDevice>::Context>,
pool: &mut Self::Pool,
input: &[u8],
fmt: PixelFormat,
roi: Rect,
backend: BackendRequest,
) -> Result<<Self as TileBatchDecodeDevice>::DeviceSurface, Self::Error>where
Self: TileBatchDecodeSubmit<Context = <Self as TileBatchDecodeDevice>::Context, DeviceSurface = <Self as TileBatchDecodeDevice>::DeviceSurface>,
Decode one tile region to the requested backend.
§Errors
Returns the codec-specific ImageCodec::Error if the region is invalid or submission or
device execution fails.
Sourcefn decode_tile_scaled_to_device(
ctx: &mut DecoderContext<<Self as TileBatchDecodeDevice>::Context>,
pool: &mut Self::Pool,
input: &[u8],
fmt: PixelFormat,
scale: Downscale,
backend: BackendRequest,
) -> Result<<Self as TileBatchDecodeDevice>::DeviceSurface, Self::Error>where
Self: TileBatchDecodeSubmit<Context = <Self as TileBatchDecodeDevice>::Context, DeviceSurface = <Self as TileBatchDecodeDevice>::DeviceSurface>,
fn decode_tile_scaled_to_device(
ctx: &mut DecoderContext<<Self as TileBatchDecodeDevice>::Context>,
pool: &mut Self::Pool,
input: &[u8],
fmt: PixelFormat,
scale: Downscale,
backend: BackendRequest,
) -> Result<<Self as TileBatchDecodeDevice>::DeviceSurface, Self::Error>where
Self: TileBatchDecodeSubmit<Context = <Self as TileBatchDecodeDevice>::Context, DeviceSurface = <Self as TileBatchDecodeDevice>::DeviceSurface>,
Decode one tile at reduced resolution to the requested backend.
§Errors
Returns the codec-specific ImageCodec::Error if the scale is unsupported or submission
or device execution fails.
Sourcefn decode_tile_region_scaled_to_device(
ctx: &mut DecoderContext<<Self as TileBatchDecodeDevice>::Context>,
pool: &mut Self::Pool,
input: &[u8],
fmt: PixelFormat,
roi: Rect,
scale: Downscale,
backend: BackendRequest,
) -> Result<<Self as TileBatchDecodeDevice>::DeviceSurface, Self::Error>where
Self: TileBatchDecodeSubmit<Context = <Self as TileBatchDecodeDevice>::Context, DeviceSurface = <Self as TileBatchDecodeDevice>::DeviceSurface>,
fn decode_tile_region_scaled_to_device(
ctx: &mut DecoderContext<<Self as TileBatchDecodeDevice>::Context>,
pool: &mut Self::Pool,
input: &[u8],
fmt: PixelFormat,
roi: Rect,
scale: Downscale,
backend: BackendRequest,
) -> Result<<Self as TileBatchDecodeDevice>::DeviceSurface, Self::Error>where
Self: TileBatchDecodeSubmit<Context = <Self as TileBatchDecodeDevice>::Context, DeviceSurface = <Self as TileBatchDecodeDevice>::DeviceSurface>,
Decode one tile region at reduced resolution to the requested backend.
§Errors
Returns the codec-specific ImageCodec::Error if the region or scale is invalid or
submission or device execution fails.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".