8 #ifndef SkImageGenerator_DEFINED
9 #define SkImageGenerator_DEFINED
16 #include "include/private/base/SkAPI.h"
18 #if defined(SK_GRAPHITE)
20 #include "include/gpu/graphite/Recorder.h"
36 uint32_t
uniqueID()
const {
return fUniqueID; }
46 return this->onRefEncodedData();
59 return this->onIsValid(context);
66 return this->onIsProtected();
124 static constexpr
int kNeedNewImageUniqueID = 0;
140 const uint32_t fUniqueID;
Definition: GrRecordingContext.h:42
Definition: SkImageGenerator.h:28
virtual sk_sp< SkData > onRefEncodedData()
Definition: SkImageGenerator.h:128
virtual bool isTextureGenerator() const
Definition: SkImageGenerator.h:121
bool getYUVAPlanes(const SkYUVAPixmaps &yuvaPixmaps)
Returns true on success and false on failure.
SkImageGenerator(const SkImageInfo &info, uint32_t uniqueId=kNeedNewImageUniqueID)
virtual bool onIsValid(GrRecordingContext *) const
Definition: SkImageGenerator.h:131
const SkImageInfo & getInfo() const
Return the ImageInfo associated with this generator.
Definition: SkImageGenerator.h:52
bool queryYUVAInfo(const SkYUVAPixmapInfo::SupportedDataTypes &supportedDataTypes, SkYUVAPixmapInfo *yuvaPixmapInfo) const
If decoding to YUV is supported, this returns true.
virtual bool onGetYUVAPlanes(const SkYUVAPixmaps &)
Definition: SkImageGenerator.h:135
virtual ~SkImageGenerator()
The PixelRef which takes ownership of this SkImageGenerator will call the image generator's destructo...
Definition: SkImageGenerator.h:34
virtual bool onQueryYUVAInfo(const SkYUVAPixmapInfo::SupportedDataTypes &, SkYUVAPixmapInfo *) const
Definition: SkImageGenerator.h:133
virtual bool onGetPixels(const SkImageInfo &, void *, size_t, const Options &)
Definition: SkImageGenerator.h:130
bool isValid(GrRecordingContext *context) const
Can this generator be used to produce images that will be drawable to the specified context (or to CP...
Definition: SkImageGenerator.h:58
sk_sp< SkData > refEncodedData()
Return a ref to the encoded (i.e.
Definition: SkImageGenerator.h:45
bool 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 + (inf...
bool getPixels(const SkPixmap &pm)
Definition: SkImageGenerator.h:93
const SkImageInfo fInfo
Definition: SkImageGenerator.h:137
virtual bool onIsProtected() const
Definition: SkImageGenerator.h:132
bool isProtected() const
Will this generator produce protected content.
Definition: SkImageGenerator.h:65
uint32_t uniqueID() const
Definition: SkImageGenerator.h:36
SkPixmap provides a utility to pair SkImageInfo with pixels and row bytes.
Definition: SkPixmap.h:40
size_t rowBytes() const
Returns row bytes, the interval from one pixel row to the next.
Definition: SkPixmap.h:145
void * writable_addr() const
Returns writable base pixel address.
Definition: SkPixmap.h:483
const SkImageInfo & info() const
Returns width, height, SkAlphaType, SkColorType, and SkColorSpace.
Definition: SkPixmap.h:135
Definition: SkYUVAPixmaps.h:51
SkYUVAInfo combined with per-plane SkColorTypes and row bytes.
Definition: SkYUVAPixmaps.h:30
Helper to store SkPixmap planes as described by a SkYUVAPixmapInfo.
Definition: SkYUVAPixmaps.h:172
Definition: SkImageGenerator.h:129
Describes pixel dimensions and encoding.
Definition: SkImageInfo.h:194