#include <SkImageGenerator.h>
◆ ~SkImageGenerator()
virtual SkImageGenerator::~SkImageGenerator |
( |
| ) |
|
|
inlinevirtual |
The PixelRef which takes ownership of this SkImageGenerator will call the image generator's destructor.
◆ SkImageGenerator()
◆ getInfo()
Return the ImageInfo associated with this generator.
◆ getPixels() [1/2]
bool SkImageGenerator::getPixels |
( |
const SkImageInfo & |
info, |
|
|
void * |
pixels, |
|
|
size_t |
rowBytes |
|
) |
| |
Decode into the given pixels, a block of memory of size at least (info.fHeight - 1) * rowBytes + (info.fWidth * bytesPerPixel)
Repeated calls to this function should give the same results, allowing the PixelRef to be immutable.
- Parameters
-
info | A description of the format expected by the caller. This can simply be identical to the info returned by getInfo(). |
This contract also allows the caller to specify different output-configs, which the implementation can decide to support or not.
A size that does not match getInfo() implies a request to scale. If the generator cannot perform this scale, it will return false.
- Returns
- true on success.
◆ getPixels() [2/2]
bool SkImageGenerator::getPixels |
( |
const SkPixmap & |
pm | ) |
|
|
inline |
◆ getYUVAPlanes()
bool SkImageGenerator::getYUVAPlanes |
( |
const SkYUVAPixmaps & |
yuvaPixmaps | ) |
|
Returns true on success and false on failure.
This always attempts to perform a full decode. To get the planar configuration without decoding use queryYUVAInfo().
- Parameters
-
yuvaPixmaps | Contains preallocated pixmaps configured according to a successful call to queryYUVAInfo(). |
◆ isValid()
Can this generator be used to produce images that will be drawable to the specified context (or to CPU, if context is nullptr)?
◆ MakeFromEncoded()
If the default image decoder system can interpret the specified (encoded) data, then this returns a new ImageGenerator for it.
Otherwise this returns NULL. Either way the caller is still responsible for managing their ownership of the data.
◆ MakeFromPicture()
Return a new image generator backed by the specified picture.
If the size is empty or the picture is NULL, this returns NULL. The optional matrix and paint arguments are passed to drawPicture() at rasterization time.
◆ onGetPixels()
virtual bool SkImageGenerator::onGetPixels |
( |
const SkImageInfo & |
, |
|
|
void * |
, |
|
|
size_t |
, |
|
|
const Options & |
|
|
) |
| |
|
inlineprotectedvirtual |
◆ onGetYUVAPlanes()
virtual bool SkImageGenerator::onGetYUVAPlanes |
( |
const SkYUVAPixmaps & |
| ) |
|
|
inlineprotectedvirtual |
◆ onIsValid()
◆ onQueryYUVAInfo()
◆ onRefEncodedData()
virtual sk_sp<SkData> SkImageGenerator::onRefEncodedData |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ queryYUVAInfo()
If decoding to YUV is supported, this returns true.
Otherwise, this returns false and the caller will ignore output parameter yuvaPixmapInfo.
- Parameters
-
supportedDataTypes | Indicates the data type/planar config combinations that are supported by the caller. If the generator supports decoding to YUV(A), but not as a type in supportedDataTypes, this method returns false. |
yuvaPixmapInfo | Output parameter that specifies the planar configuration, subsampling, orientation, chroma siting, plane color types, and row bytes. |
◆ refEncodedData()
Return a ref to the encoded (i.e.
compressed) representation of this data.
If non-NULL is returned, the caller is responsible for calling unref() on the data when it is finished.
◆ uniqueID()
uint32_t SkImageGenerator::uniqueID |
( |
| ) |
const |
|
inline |
◆ SkImage_Lazy
friend class SkImage_Lazy |
|
friend |
◆ kNeedNewImageUniqueID
constexpr int SkImageGenerator::kNeedNewImageUniqueID = 0 |
|
staticconstexprprotected |
The documentation for this class was generated from the following file: