Flutter Engine
The Flutter Engine
|
#include <SkPngCodec.h>
Classes | |
struct | voidp |
Static Public Member Functions | |
static bool | IsPng (const void *, size_t) |
static std::unique_ptr< SkCodec > | MakeFromStream (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< SkCodec > | MakeFromStream (std::unique_ptr< SkStream >, SkSpan< const SkCodecs::Decoder > decoders, Result *=nullptr, SkPngChunkReader *=nullptr, SelectionPolicy selectionPolicy=SelectionPolicy::kPreferStillImage) |
static std::unique_ptr< SkCodec > | MakeFromStream (std::unique_ptr< SkStream >, Result *=nullptr, SkPngChunkReader *=nullptr, SelectionPolicy selectionPolicy=SelectionPolicy::kPreferStillImage) |
static std::unique_ptr< SkCodec > | MakeFromData (sk_sp< SkData >, SkSpan< const SkCodecs::Decoder > decoders, SkPngChunkReader *=nullptr) |
static std::unique_ptr< SkCodec > | MakeFromData (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 *)) |
Protected Member Functions | |
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 |
SkSampler * | getSampler (bool createIfNecessary) override |
void | applyXformRow (void *dst, const void *src) |
voidp | png_ptr () |
voidp | info_ptr () |
SkSwizzler * | swizzler () |
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 SkEncodedInfo & | getEncodedInfo () 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 () |
SkStream * | stream () |
virtual SkScanlineOrder | onGetScanlineOrder () const |
const SkImageInfo & | dstInfo () const |
const Options & | options () 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 | |
sk_sp< SkPngChunkReader > | fPngChunkReader |
voidp | fPng_ptr |
voidp | fInfo_ptr |
sk_sp< SkColorPalette > | fColorTable |
std::unique_ptr< SkSwizzler > | fSwizzler |
skia_private::AutoTMalloc< uint8_t > | fStorage |
void * | fColorXformSrcRow |
const int | fBitDepth |
Private Member Functions | |
virtual Result | decodeAllRows (void *dst, size_t rowBytes, int *rowsDecoded)=0 |
virtual void | setRange (int firstRow, int lastRow, void *dst, size_t rowBytes)=0 |
virtual Result | decode (int *rowsDecoded)=0 |
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 |
Definition at line 27 of file SkPngCodec.h.
|
override |
Definition at line 1017 of file SkPngCodec.cpp.
|
protected |
Definition at line 1005 of file SkPngCodec.cpp.
|
protected |
Definition at line 486 of file SkPngCodec.cpp.
|
privatepure virtual |
|
overrideprotectedvirtual |
Return an object which will allow forcing scanline decodes to sample in X.
May create a sampler, if one is not currently being used. Otherwise, does not affect ownership.
Only valid during scanline decoding or incremental decoding.
Reimplemented from SkCodec.
Definition at line 1141 of file SkPngCodec.cpp.
|
inlineprotected |
Definition at line 66 of file SkPngCodec.h.
|
protected |
Definition at line 1077 of file SkPngCodec.cpp.
|
static |
Definition at line 344 of file SkPngCodec.cpp.
|
static |
Definition at line 1216 of file SkPngCodec.cpp.
|
inlineoverrideprotectedvirtual |
|
overrideprotectedvirtual |
rowsDecoded | When the encoded image stream is incomplete, this function will return kIncompleteInput and rowsDecoded will be set to the number of scanlines that were successfully decoded. This will allow getPixels() to fill the uninitialized memory. |
Implements SkCodec.
Definition at line 1171 of file SkPngCodec.cpp.
|
overrideprotectedvirtual |
Reimplemented from SkCodec.
Definition at line 1209 of file SkPngCodec.cpp.
|
overrideprotectedvirtual |
Called by rewindIfNeeded, if the stream needed to be rewound.
Subclasses should do any set up needed after a rewind.
Reimplemented from SkCodec.
Definition at line 1150 of file SkPngCodec.cpp.
|
overrideprotectedvirtual |
Reimplemented from SkCodec.
Definition at line 1188 of file SkPngCodec.cpp.
|
inlineprotected |
Definition at line 65 of file SkPngCodec.h.
|
protected |
Pass available input to libpng to process it.
libpng will call any relevant callbacks installed. This will continue decoding until it reaches the end of the file, or until a callback tells libpng to stop.
Definition at line 213 of file SkPngCodec.cpp.
|
inline |
Definition at line 36 of file SkPngCodec.h.
|
privatepure virtual |
|
inlineprotected |
Definition at line 68 of file SkPngCodec.h.
|
protected |
Definition at line 94 of file SkPngCodec.h.
|
protected |
Definition at line 90 of file SkPngCodec.h.
|
protected |
Definition at line 93 of file SkPngCodec.h.
|
protected |
Definition at line 87 of file SkPngCodec.h.
|
protected |
Definition at line 86 of file SkPngCodec.h.
|
protected |
Definition at line 85 of file SkPngCodec.h.
|
protected |
Definition at line 92 of file SkPngCodec.h.
|
protected |
Definition at line 91 of file SkPngCodec.h.