Function vizia::vg::gpu::images::texture_from_yuva_pixmaps

pub fn texture_from_yuva_pixmaps(
    context: &mut RCHandle<GrRecordingContext>,
    yuva_pixmaps: &Handle<SkYUVAPixmaps>,
    build_mips: impl Into<Option<skgpu_Mipmapped>>,
    limit_to_max_texture_size: impl Into<Option<bool>>,
    image_color_space: impl Into<Option<RCHandle<SkColorSpace>>>,
) -> Option<RCHandle<SkImage>>
Expand description

Creates a GPU-backed Image from YUVAPixmaps. The image will remain planar with each plane converted to a texture using the passed RecordingContext. YUVAPixmaps has a YUVAInfo which specifies the transformation from YUV to RGB. The ColorSpace of the resulting RGB values is specified by image_color_space. This will be the ColorSpace reported by the image and when drawn the RGB values will be converted from this space into the destination space (if the destination is tagged). Currently, this is only supported using the GPU backend and will fail if context is None. YUVAPixmaps does not need to remain valid after this returns.

  • context - GPU context
  • pixmaps - The planes as pixmaps with supported YUVAInfo that specifies conversion to RGB.
  • build_mips - create internal YUVA textures as mip map if k_yes. This is silently ignored if the context does not support mip maps.
  • limit_to_max_texture_size - downscale image to GPU maximum texture size, if necessary
  • image_color_space - range of colors of the resulting image; may be None Returns: created Image, or None