Skia
2D Graphics Library
|
Helper to store SkPixmap planes as described by a SkYUVAPixmapInfo. More...
#include <SkYUVAPixmaps.h>
Public Types | |
using | DataType = SkYUVAPixmapInfo::DataType |
Public Member Functions | |
SkYUVAPixmaps ()=default | |
Default SkYUVAPixmaps is invalid. More... | |
~SkYUVAPixmaps ()=default | |
SkYUVAPixmaps (SkYUVAPixmaps &&that)=default | |
SkYUVAPixmaps & | operator= (SkYUVAPixmaps &&that)=default |
SkYUVAPixmaps (const SkYUVAPixmaps &)=default | |
SkYUVAPixmaps & | operator= (const SkYUVAPixmaps &that)=default |
bool | isValid () const |
Does have initialized pixmaps compatible with its SkYUVAInfo. More... | |
const SkYUVAInfo & | yuvaInfo () const |
DataType | dataType () const |
SkYUVAPixmapInfo | pixmapsInfo () const |
int | numPlanes () const |
Number of pixmap planes or 0 if this SkYUVAPixmaps is invalid. More... | |
const std::array< SkPixmap, kMaxPlanes > & | planes () const |
Access the SkPixmap planes. More... | |
const SkPixmap & | plane (int i) const |
Get the ith SkPixmap plane. More... | |
SkYUVAInfo::YUVALocations | toYUVALocations () const |
Computes a YUVALocations representation of the planar layout. More... | |
bool | ownsStorage () const |
Does this SkPixmaps own the backing store of the planes? More... | |
Static Public Member Functions | |
static SkColorType | RecommendedRGBAColorType (DataType) |
static SkYUVAPixmaps | Allocate (const SkYUVAPixmapInfo &yuvaPixmapInfo) |
Allocate space for pixmaps' pixels in the SkYUVAPixmaps. More... | |
static SkYUVAPixmaps | FromData (const SkYUVAPixmapInfo &, sk_sp< SkData >) |
Use storage in SkData as backing store for pixmaps' pixels. More... | |
static SkYUVAPixmaps | MakeCopy (const SkYUVAPixmaps &src) |
Makes a deep copy of the src SkYUVAPixmaps. More... | |
static SkYUVAPixmaps | FromExternalMemory (const SkYUVAPixmapInfo &, void *memory) |
Use passed in memory as backing store for pixmaps' pixels. More... | |
static SkYUVAPixmaps | FromExternalPixmaps (const SkYUVAInfo &, const SkPixmap[kMaxPlanes]) |
Wraps existing SkPixmaps. More... | |
Static Public Attributes | |
static constexpr auto | kMaxPlanes = SkYUVAPixmapInfo::kMaxPlanes |
Helper to store SkPixmap planes as described by a SkYUVAPixmapInfo.
Can be responsible for allocating/freeing memory for pixmaps or use external memory.
|
default |
Default SkYUVAPixmaps is invalid.
|
default |
|
default |
|
default |
|
static |
Allocate space for pixmaps' pixels in the SkYUVAPixmaps.
|
inline |
|
static |
Use storage in SkData as backing store for pixmaps' pixels.
SkData is retained by the SkYUVAPixmaps.
|
static |
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 SkYUVAPixmapInfo::computeTotalBytes() allocated starting at memory.
|
static |
Wraps existing SkPixmaps.
The SkYUVAPixmaps will have no ownership of the SkPixmaps' pixel memory so the caller must ensure it remains valid. Will return an invalid SkYUVAPixmaps if the SkYUVAInfo isn't compatible with the SkPixmap array (number of planes, plane dimensions, sufficient color channels in planes, ...).
|
inline |
Does have initialized pixmaps compatible with its SkYUVAInfo.
|
static |
Makes a deep copy of the src SkYUVAPixmaps.
The returned SkYUVAPixmaps owns its planes' backing stores.
|
inline |
Number of pixmap planes or 0 if this SkYUVAPixmaps is invalid.
|
default |
|
default |
|
inline |
Does this SkPixmaps own the backing store of the planes?
SkYUVAPixmapInfo SkYUVAPixmaps::pixmapsInfo | ( | ) | const |
|
inline |
Get the ith SkPixmap plane.
SkPixmap will be default initialized if i >= numPlanes or this SkYUVAPixmaps is invalid.
|
inline |
Access the SkPixmap planes.
They are default initialized if this is not a valid SkYUVAPixmaps.
|
static |
SkYUVAInfo::YUVALocations SkYUVAPixmaps::toYUVALocations | ( | ) | const |
Computes a YUVALocations representation of the planar layout.
The result is guaranteed to be valid if this->isValid().
|
inline |
|
staticconstexpr |