Function skia_safe::gpu::images::adopt_texture_from
source · pub fn adopt_texture_from(
context: &mut RecordingContext,
backend_texture: &BackendTexture,
texture_origin: SurfaceOrigin,
color_type: ColorType,
alpha_type: impl Into<Option<AlphaType>>,
color_space: impl Into<Option<ColorSpace>>
) -> Option<Image>Expand description
Creates GPU-backed Image from backend_texture associated with context.
Skia will assume ownership of the resource and will release it when no longer needed.
A non-null Image is returned if format of backend_texture is recognized and supported.
Recognized formats vary by GPU backend.
context- GPU contextbackend_texture- texture residing on GPUtexture_origin- origin ofbackend_texturecolor_type- color type of the resulting imagealpha_type- alpha type of the resulting imagecolor_space- range of colors; may beNoneReturns: createdImage, orNone