Function skia_safe::gpu::surfaces::render_target
source · pub fn render_target(
context: &mut RecordingContext,
budgeted: Budgeted,
image_info: &ImageInfo,
sample_count: impl Into<Option<usize>>,
surface_origin: impl Into<Option<SurfaceOrigin>>,
surface_props: Option<&SurfaceProps>,
should_create_with_mips: impl Into<Option<bool>>
) -> Option<Surface>Expand description
Returns Surface on GPU indicated by context. Allocates memory for pixels, based on the
width, height, and crate::ColorType in ImageInfo. budgeted selects whether allocation
for pixels is tracked by context. image_info describes the pixel format in
crate::ColorType, and transparency in crate::AlphaType, and color matching in
crate::ColorSpace.
sample_count requests the number of samples per pixel. Pass zero to disable multi-sample
anti-aliasing. The request is rounded up to the next supported count, or rounded down if it is
larger than the maximum supported count.
surface_origin pins either the top-left or the bottom-left corner to the origin.
should_create_with_mips hints that crate::Image returned by Surface::image_snapshot is
mip map.
context- GPU contextimage_info- width, height,crate::ColorType,crate::AlphaType,crate::ColorSpace; width, or height, or both, may be zerosample_count- samples per pixel, or 0 to disable full scene anti-aliasingsurface_props- LCD striping orientation and setting for device independent fonts; may beNoneshould_create_with_mips- hint thatSurfacewill host mip map images Returns:Surfaceif all parameters are valid; otherwise,None