Flutter Engine
The Flutter Engine
Public Member Functions | Protected Member Functions | List of all members
RasterGenerator Class Reference
Inheritance diagram for RasterGenerator:
SkImageGenerator

Public Member Functions

 RasterGenerator (const SkBitmap &bm)
 
- Public Member Functions inherited from SkImageGenerator
virtual ~SkImageGenerator ()
 
uint32_t uniqueID () const
 
sk_sp< SkDatarefEncodedData ()
 
const SkImageInfogetInfo () const
 
bool isValid (GrRecordingContext *context) const
 
bool isProtected () const
 
bool getPixels (const SkImageInfo &info, void *pixels, size_t rowBytes)
 
bool getPixels (const SkPixmap &pm)
 
bool queryYUVAInfo (const SkYUVAPixmapInfo::SupportedDataTypes &supportedDataTypes, SkYUVAPixmapInfo *yuvaPixmapInfo) const
 
bool getYUVAPlanes (const SkYUVAPixmaps &yuvaPixmaps)
 
virtual bool isTextureGenerator () const
 

Protected Member Functions

bool onGetPixels (const SkImageInfo &info, void *pixels, size_t rowBytes, const Options &) override
 
- Protected Member Functions inherited from SkImageGenerator
 SkImageGenerator (const SkImageInfo &info, uint32_t uniqueId=kNeedNewImageUniqueID)
 
virtual sk_sp< SkDataonRefEncodedData ()
 
virtual bool onGetPixels (const SkImageInfo &, void *, size_t, const Options &)
 
virtual bool onIsValid (GrRecordingContext *) const
 
virtual bool onIsProtected () const
 
virtual bool onQueryYUVAInfo (const SkYUVAPixmapInfo::SupportedDataTypes &, SkYUVAPixmapInfo *) const
 
virtual bool onGetYUVAPlanes (const SkYUVAPixmaps &)
 

Additional Inherited Members

- Protected Attributes inherited from SkImageGenerator
const SkImageInfo fInfo
 
- Static Protected Attributes inherited from SkImageGenerator
static constexpr int kNeedNewImageUniqueID = 0
 

Detailed Description

Definition at line 146 of file image_pict.cpp.

Constructor & Destructor Documentation

◆ RasterGenerator()

RasterGenerator::RasterGenerator ( const SkBitmap bm)
inline

Definition at line 148 of file image_pict.cpp.

148 : SkImageGenerator(bm.info()), fBM(bm)
149 {}
const SkImageInfo & info() const
Definition: SkBitmap.h:139
SkImageGenerator(const SkImageInfo &info, uint32_t uniqueId=kNeedNewImageUniqueID)

Member Function Documentation

◆ onGetPixels()

bool RasterGenerator::onGetPixels ( const SkImageInfo info,
void *  pixels,
size_t  rowBytes,
const Options  
)
inlineoverrideprotectedvirtual

Reimplemented from SkImageGenerator.

Definition at line 152 of file image_pict.cpp.

153 {
154 SkASSERT(fBM.width() == info.width());
155 SkASSERT(fBM.height() == info.height());
156 return fBM.readPixels(info, pixels, rowBytes, 0, 0);
157 }
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition: DM.cpp:213
#define SkASSERT(cond)
Definition: SkAssert.h:116
int width() const
Definition: SkBitmap.h:149
bool readPixels(const SkImageInfo &dstInfo, void *dstPixels, size_t dstRowBytes, int srcX, int srcY) const
Definition: SkBitmap.cpp:488
int height() const
Definition: SkBitmap.h:158

The documentation for this class was generated from the following file: