YUVAPixmaps
- class YUVAPixmaps
Helper to store
Pixmapplanes as described by aYUVAPixmapInfo. Can be responsible for allocating/freeing memory for pixmaps or use external memory.Methods
Allocate(yuvaPixmapInfo: skia.YUVAPixmapInfo) -> skia.YUVAPixmaps
FromData(yuvaPixmapInfo: skia.YUVAPixmapInfo, data: skia.Data) -> skia.YUVAPixmaps
FromExternalMemory(yuvaPixmapInfo: skia.YUVAPixmapInfo, memory: Buffer) -> skia.YUVAPixmaps
FromExternalPixmaps(yuvaInfo: skia.YUVAInfo, pixmaps: list[skia.Pixmap]) -> skia.YUVAPixmaps
__init__(self: skia.YUVAPixmaps) -> None
isValid(self: skia.YUVAPixmaps) -> bool
numPlanes(self: skia.YUVAPixmaps) -> int
plane(self: skia.YUVAPixmaps, i: int) -> skia.Pixmap
planes(self: skia.YUVAPixmaps) -> Annotated[list[skia.Pixmap], FixedSize(4)]
yuvaInfo(self: skia.YUVAPixmaps) -> skia.YUVAInfo
Methods
- static YUVAPixmaps.Allocate(yuvaPixmapInfo: skia.YUVAPixmapInfo) skia.YUVAPixmaps
Allocate space for pixmaps’ pixels in the
YUVAPixmaps.
- static YUVAPixmaps.FromData(yuvaPixmapInfo: skia.YUVAPixmapInfo, data: skia.Data) skia.YUVAPixmaps
Use storage in
Dataas backing store for pixmaps’ pixels.Datais retained by theYUVAPixmaps.
- static YUVAPixmaps.FromExternalMemory(yuvaPixmapInfo: skia.YUVAPixmapInfo, memory: Buffer) skia.YUVAPixmaps
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()allocated starting at memory.
- static YUVAPixmaps.FromExternalPixmaps(yuvaInfo: skia.YUVAInfo, pixmaps: list[skia.Pixmap]) skia.YUVAPixmaps
Wraps existing
Pixmap. TheYUVAPixmapswill have no ownership of thePixmap’ pixel memory so the caller must ensure it remains valid. Will return an invalidYUVAPixmapsif theYUVAInfoisn’t compatible with thePixmaparray (number of planes, plane dimensions, sufficient color channels in planes, …).
- YUVAPixmaps.__init__(self: skia.YUVAPixmaps) None
- YUVAPixmaps.isValid(self: skia.YUVAPixmaps) bool
Does have initialized pixmaps compatible with its
YUVAInfo.
- YUVAPixmaps.numPlanes(self: skia.YUVAPixmaps) int
Number of pixmap planes or 0 if this
YUVAPixmapsis invalid.
- YUVAPixmaps.plane(self: skia.YUVAPixmaps, i: int) skia.Pixmap
Get the ith
Pixmapplane.Pixmapwill be default initialized if i >= numPlanes or thisYUVAPixmapsis invalid.
- YUVAPixmaps.planes(self: skia.YUVAPixmaps) Annotated[list[skia.Pixmap], FixedSize(4)]
Access the
Pixmapplanes. They are default initialized if this is not a validYUVAPixmaps.
- YUVAPixmaps.yuvaInfo(self: skia.YUVAPixmaps) skia.YUVAInfo