vizia::vg::gpu::ganesh::images

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 context
  • data - compressed data to store in Image
  • width - width of full Image
  • height - height of full Image
  • ty - type of compression used
  • mipmapped - 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