Function texture_from_compressed_texture_data
pub fn texture_from_compressed_texture_data(
context: &mut RCHandle<GrDirectContext>,
data: RCHandle<SkData>,
dimensions: impl Into<ISize>,
ty: SkTextureCompressionType,
mipmapped: impl Into<Option<skgpu_Mipmapped>>,
is_protected: impl Into<Option<skgpu_Protected>>,
) -> Option<RCHandle<SkImage>>
Expand description
Creates a GPU-backed Image
from compressed data.
This method will return an Image
representing the compressed data.
If the GPU doesn’t support the specified compression method, the data
will be decompressed and then wrapped in a GPU-backed image.
Note: one can query the supported compression formats via
RecordingContext::compressed_backend_format
.
context
- GPU contextdata
- compressed data to store inImage
width
- width of fullImage
height
- height of fullImage
ty
- type of compression usedmipmapped
- does ‘data’ contain data for all the mipmap levels?is_protected
- do the contents of ‘data’ require DRM protection (on Vulkan)?
Returns: created Image
, or None