Type Alias YUVAPixmaps
pub type YUVAPixmaps = Handle<SkYUVAPixmaps>;
Expand description
Helper to store Pixmap planes as described by a YUVAPixmapInfo. Can be responsible for allocating/freeing memory for pixmaps or use external memory.
Aliased Type§
struct YUVAPixmaps(/* private fields */);
Implementations
§impl Handle<SkYUVAPixmaps>
impl Handle<SkYUVAPixmaps>
pub const MAX_PLANES: usize = 4usize
pub fn recommended_rgba_color_type(dt: SkYUVAPixmapInfo_DataType) -> ColorType
pub fn allocate(
info: &Handle<SkYUVAPixmapInfo>,
) -> Option<Handle<SkYUVAPixmaps>>
pub fn allocate( info: &Handle<SkYUVAPixmapInfo>, ) -> Option<Handle<SkYUVAPixmaps>>
Allocate space for pixmaps’ pixels in the YUVAPixmaps.
pub fn from_data(
info: &Handle<SkYUVAPixmapInfo>,
data: impl Into<RCHandle<SkData>>,
) -> Option<Handle<SkYUVAPixmaps>>
pub fn from_data( info: &Handle<SkYUVAPixmapInfo>, data: impl Into<RCHandle<SkData>>, ) -> Option<Handle<SkYUVAPixmaps>>
Use storage in Data as backing store for pixmaps’ pixels. Data is retained by the YUVAPixmaps.
pub unsafe fn from_external_memory(
info: &Handle<SkYUVAPixmapInfo>,
memory: *mut c_void,
) -> Option<Handle<SkYUVAPixmaps>>
pub unsafe fn from_external_memory( info: &Handle<SkYUVAPixmapInfo>, memory: *mut c_void, ) -> Option<Handle<SkYUVAPixmaps>>
Use passed in memory as backing store for pixmaps’ pixels. Caller must ensure memory remains allocated while pixmaps are in use. There must be at least [YUVAPixmapInfo::computeTotalBytes(&self)] allocated starting at memory.
pub unsafe fn from_external_pixmaps(
info: &Handle<SkYUVAInfo>,
pixmaps: &[Pixmap<'_>; 4],
) -> Option<Handle<SkYUVAPixmaps>>
pub unsafe fn from_external_pixmaps( info: &Handle<SkYUVAInfo>, pixmaps: &[Pixmap<'_>; 4], ) -> Option<Handle<SkYUVAPixmaps>>
Wraps existing Pixmap
s. The YUVAPixmaps will have no ownership of the Pixmaps’ pixel
memory so the caller must ensure it remains valid. Will return None if
the YUVAInfo isn’t compatible with the Pixmap array (number of planes, plane dimensions,
sufficient color channels in planes, …).
pub fn yuva_info(&self) -> &Handle<SkYUVAInfo>
pub fn data_type(&self) -> SkYUVAPixmapInfo_DataType
pub fn pixmaps_info(&self) -> Handle<SkYUVAPixmapInfo>
pub fn num_planes(&self) -> usize
pub fn num_planes(&self) -> usize
Number of pixmap planes.