Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Member Functions | List of all members
SkPngInterlacedDecoder Class Reference
Inheritance diagram for SkPngInterlacedDecoder:
SkPngCodec SkCodec SkNoncopyable

Public Member Functions

 SkPngInterlacedDecoder (SkEncodedInfo &&info, std::unique_ptr< SkStream > stream, SkPngChunkReader *reader, png_structp png_ptr, png_infop info_ptr, int bitDepth, int numberPasses)
 
- Public Member Functions inherited from SkPngCodec
void setIdatLength (size_t len)
 
 ~SkPngCodec () override
 
- Public Member Functions inherited from SkCodec
virtual ~SkCodec ()
 
SkImageInfo getInfo () const
 
SkISize dimensions () const
 
SkIRect bounds () const
 
const skcms_ICCProfilegetICCProfile () const
 
SkEncodedOrigin getOrigin () const
 
SkISize getScaledDimensions (float desiredScale) const
 
bool getValidSubset (SkIRect *desiredSubset) const
 
SkEncodedImageFormat getEncodedFormat () const
 
virtual std::unique_ptr< SkStreamgetEncodedData () const
 
Result getPixels (const SkImageInfo &info, void *pixels, size_t rowBytes, const Options *)
 
Result getPixels (const SkImageInfo &info, void *pixels, size_t rowBytes)
 
Result getPixels (const SkPixmap &pm, const Options *opts=nullptr)
 
std::tuple< sk_sp< SkImage >, SkCodec::ResultgetImage (const SkImageInfo &info, const Options *opts=nullptr)
 
std::tuple< sk_sp< SkImage >, SkCodec::ResultgetImage ()
 
bool queryYUVAInfo (const SkYUVAPixmapInfo::SupportedDataTypes &supportedDataTypes, SkYUVAPixmapInfo *yuvaPixmapInfo) const
 
Result getYUVAPlanes (const SkYUVAPixmaps &yuvaPixmaps)
 
Result startIncrementalDecode (const SkImageInfo &dstInfo, void *dst, size_t rowBytes, const Options *)
 
Result startIncrementalDecode (const SkImageInfo &dstInfo, void *dst, size_t rowBytes)
 
Result incrementalDecode (int *rowsDecoded=nullptr)
 
Result startScanlineDecode (const SkImageInfo &dstInfo, const Options *options)
 
Result startScanlineDecode (const SkImageInfo &dstInfo)
 
int getScanlines (void *dst, int countLines, size_t rowBytes)
 
bool skipScanlines (int countLines)
 
SkScanlineOrder getScanlineOrder () const
 
int nextScanline () const
 
int outputScanline (int inputScanline) const
 
int getFrameCount ()
 
bool getFrameInfo (int index, FrameInfo *info) const
 
std::vector< FrameInfogetFrameInfo ()
 
int getRepetitionCount ()
 

Static Public Member Functions

static void InterlacedRowCallback (png_structp png_ptr, png_bytep row, png_uint_32 rowNum, int pass)
 
- Static Public Member Functions inherited from SkPngCodec
static bool IsPng (const void *, size_t)
 
static std::unique_ptr< SkCodecMakeFromStream (std::unique_ptr< SkStream >, Result *, SkPngChunkReader *=nullptr)
 
- Static Public Member Functions inherited from SkCodec
static constexpr size_t MinBufferedBytesNeeded ()
 
static const char * ResultToString (Result)
 
static std::unique_ptr< SkCodecMakeFromStream (std::unique_ptr< SkStream >, SkSpan< const SkCodecs::Decoder > decoders, Result *=nullptr, SkPngChunkReader *=nullptr, SelectionPolicy selectionPolicy=SelectionPolicy::kPreferStillImage)
 
static std::unique_ptr< SkCodecMakeFromStream (std::unique_ptr< SkStream >, Result *=nullptr, SkPngChunkReader *=nullptr, SelectionPolicy selectionPolicy=SelectionPolicy::kPreferStillImage)
 
static std::unique_ptr< SkCodecMakeFromData (sk_sp< SkData >, SkSpan< const SkCodecs::Decoder > decoders, SkPngChunkReader *=nullptr)
 
static std::unique_ptr< SkCodecMakeFromData (sk_sp< SkData >, SkPngChunkReader *=nullptr)
 
static void Register (bool(*peek)(const void *, size_t), std::unique_ptr< SkCodec >(*make)(std::unique_ptr< SkStream >, SkCodec::Result *))
 

Additional Inherited Members

- Public Types inherited from SkCodec
enum  Result {
  kSuccess , kIncompleteInput , kErrorInInput , kInvalidConversion ,
  kInvalidScale , kInvalidParameters , kInvalidInput , kCouldNotRewind ,
  kInternalError , kUnimplemented
}
 
enum class  SelectionPolicy { kPreferStillImage , kPreferAnimation }
 
enum  ZeroInitialized { kYes_ZeroInitialized , kNo_ZeroInitialized }
 
enum  SkScanlineOrder { kTopDown_SkScanlineOrder , kBottomUp_SkScanlineOrder }
 
- Static Public Attributes inherited from SkCodec
static constexpr int kNoFrame = -1
 
static constexpr int kRepetitionCountInfinite = -1
 
- Protected Types inherited from SkCodec
using XformFormat = skcms_PixelFormat
 
- Protected Member Functions inherited from SkPngCodec
 SkPngCodec (SkEncodedInfo &&, std::unique_ptr< SkStream >, SkPngChunkReader *, void *png_ptr, void *info_ptr, int bitDepth)
 
Result onGetPixels (const SkImageInfo &, void *, size_t, const Options &, int *) override
 
SkEncodedImageFormat onGetEncodedFormat () const override
 
bool onRewind () override
 
SkSamplergetSampler (bool createIfNecessary) override
 
void applyXformRow (void *dst, const void *src)
 
voidp png_ptr ()
 
voidp info_ptr ()
 
SkSwizzlerswizzler ()
 
void initializeXformParams ()
 
bool processData ()
 
Result onStartIncrementalDecode (const SkImageInfo &dstInfo, void *pixels, size_t rowBytes, const SkCodec::Options &) override
 
Result onIncrementalDecode (int *) override
 
- Protected Member Functions inherited from SkCodec
const SkEncodedInfogetEncodedInfo () const
 
 SkCodec (SkEncodedInfo &&, XformFormat srcFormat, std::unique_ptr< SkStream >, SkEncodedOrigin=kTopLeft_SkEncodedOrigin)
 
void setSrcXformFormat (XformFormat pixelFormat)
 
XformFormat getSrcXformFormat () const
 
virtual bool onGetGainmapInfo (SkGainmapInfo *, std::unique_ptr< SkStream > *)
 
virtual SkISize onGetScaledDimensions (float) const
 
virtual bool onDimensionsSupported (const SkISize &)
 
virtual SkEncodedImageFormat onGetEncodedFormat () const =0
 
virtual Result onGetPixels (const SkImageInfo &info, void *pixels, size_t rowBytes, const Options &, int *rowsDecoded)=0
 
virtual bool onQueryYUVAInfo (const SkYUVAPixmapInfo::SupportedDataTypes &, SkYUVAPixmapInfo *) const
 
virtual Result onGetYUVAPlanes (const SkYUVAPixmaps &)
 
virtual bool onGetValidSubset (SkIRect *) const
 
bool rewindIfNeeded ()
 
virtual bool onRewind ()
 
SkStreamstream ()
 
virtual SkScanlineOrder onGetScanlineOrder () const
 
const SkImageInfodstInfo () const
 
const Optionsoptions () const
 
int currScanline () const
 
virtual int onOutputScanline (int inputScanline) const
 
virtual bool conversionSupported (const SkImageInfo &dst, bool srcIsOpaque, bool needsColorXform)
 
virtual bool usesColorXform () const
 
void applyColorXform (void *dst, const void *src, int count) const
 
bool colorXform () const
 
bool xformOnDecode () const
 
virtual int onGetFrameCount ()
 
virtual bool onGetFrameInfo (int, FrameInfo *) const
 
virtual int onGetRepetitionCount ()
 
- Protected Attributes inherited from SkPngCodec
sk_sp< SkPngChunkReaderfPngChunkReader
 
voidp fPng_ptr
 
voidp fInfo_ptr
 
sk_sp< SkColorPalettefColorTable
 
std::unique_ptr< SkSwizzlerfSwizzler
 
skia_private::AutoTMalloc< uint8_t > fStorage
 
void * fColorXformSrcRow
 
const int fBitDepth
 

Detailed Description

Definition at line 625 of file SkPngCodec.cpp.

Constructor & Destructor Documentation

◆ SkPngInterlacedDecoder()

SkPngInterlacedDecoder::SkPngInterlacedDecoder ( SkEncodedInfo &&  info,
std::unique_ptr< SkStream stream,
SkPngChunkReader reader,
png_structp  png_ptr,
png_infop  info_ptr,
int  bitDepth,
int  numberPasses 
)
inline

Definition at line 627 of file SkPngCodec.cpp.

630 : INHERITED(std::move(info), std::move(stream), reader, png_ptr, info_ptr, bitDepth)
631 , fNumberPasses(numberPasses)
632 , fFirstRow(0)
633 , fLastRow(0)
634 , fLinesDecoded(0)
635 , fInterlacedComplete(false)
636 , fPng_rowbytes(0)
637 {}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition: DM.cpp:213
SkStream * stream()
Definition: SkCodec.h:865
voidp info_ptr()
Definition: SkPngCodec.h:66
voidp png_ptr()
Definition: SkPngCodec.h:65

Member Function Documentation

◆ InterlacedRowCallback()

static void SkPngInterlacedDecoder::InterlacedRowCallback ( png_structp  png_ptr,
png_bytep  row,
png_uint_32  rowNum,
int  pass 
)
inlinestatic

Definition at line 639 of file SkPngCodec.cpp.

639 {
640 auto decoder = static_cast<SkPngInterlacedDecoder*>(png_get_progressive_ptr(png_ptr));
641 decoder->interlacedRowCallback(row, rowNum, pass);
642 }

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