Skip to main content

Module codecs

Module codecs 

Expand description

The registry of decoder implementations for the image formats that Skia supports natively.

A Decoder can be passed to Codec::from_stream or Codec::from_data_with_decoders to decode a specific format.

Functions§

deferred_image
Return an image using the encoded data, but attempts to defer decoding until the image is actually used/drawn. This deferral allows the system to cache the result, either on the CPU or on the GPU, depending on where the image is drawn. If memory is low, the cache may be purged, causing the next draw of the image to have to re-decode.

Type Aliases§

Decoder
A decoder implementation for a specific image format that can be passed to Codec::from_stream or Codec::from_data_with_decoders to decode that format.