Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
SkPngChunkReader Class Referenceabstract

#include <SkPngChunkReader.h>

Inheritance diagram for SkPngChunkReader:
SkRefCnt SkRefCntBase

Public Member Functions

virtual bool readChunk (const char tag[], const void *data, size_t length)=0
 
- Public Member Functions inherited from SkRefCntBase
 SkRefCntBase ()
 
virtual ~SkRefCntBase ()
 
bool unique () const
 
void ref () const
 
void unref () const
 

Detailed Description

SkPngChunkReader

Base class for optional callbacks to retrieve meta/chunk data out of a PNG encoded image as it is being decoded. Used by SkCodec.

Definition at line 21 of file SkPngChunkReader.h.

Member Function Documentation

◆ readChunk()

virtual bool SkPngChunkReader::readChunk ( const char  tag[],
const void *  data,
size_t  length 
)
pure virtual

This will be called by the decoder when it sees an unknown chunk.

Use by SkCodec: Depending on the location of the unknown chunks, this callback may be called by

  • the factory (NewFromStream/NewFromData)
  • getPixels
  • startScanlineDecode
  • the first call to getScanlines/skipScanlines The callback may be called from a different thread (e.g. if the SkCodec is passed to another thread), and it may be called multiple times, if the SkCodec is used multiple times.
Parameters
tagName for this type of chunk.
dataData to be interpreted by the subclass.
lengthNumber of bytes of data in the chunk.
Returns
true to continue decoding, or false to indicate an error, which will cause the decoder to not return the image.

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