Flutter Engine
The Flutter Engine
|
Classes | |
struct | Options |
Enumerations | |
enum class | FilterFlag : int { kZero = 0x00 , kNone = 0x08 , kSub = 0x10 , kUp = 0x20 , kAvg = 0x40 , kPaeth = 0x80 , kAll = kNone | kSub | kUp | kAvg | kPaeth } |
Functions | |
FilterFlag | operator| (FilterFlag x, FilterFlag y) |
SK_API bool | Encode (SkWStream *dst, const SkPixmap &src, const Options &options) |
SK_API sk_sp< SkData > | Encode (GrDirectContext *ctx, const SkImage *img, const Options &options) |
SK_API std::unique_ptr< SkEncoder > | Make (SkWStream *dst, const SkPixmap &src, const Options &options) |
|
strong |
sk_sp< SkData > SkPngEncoder::Encode | ( | GrDirectContext * | ctx, |
const SkImage * | img, | ||
const Options & | options | ||
) |
Encode the provided image and return the resulting bytes. If the image was created as a texture-backed image on a GPU context, that |ctx| must be provided so the pixels can be read before being encoded. For raster-backed images, |ctx| can be nullptr. |options| may be used to control the encoding behavior.
Returns nullptr if the pixels could not be read or encoding otherwise fails.
Definition at line 25 of file SkPngEncoder_none.cpp.
Encode the |src| pixels to the |dst| stream. |options| may be used to control the encoding behavior.
Returns true on success. Returns false on an invalid or unsupported |src|.
Definition at line 20 of file SkPngEncoder_none.cpp.
std::unique_ptr< SkEncoder > SkPngEncoder::Make | ( | SkWStream * | dst, |
const SkPixmap & | src, | ||
const Options & | options | ||
) |
Create a png encoder that will encode the |src| pixels to the |dst| stream. |options| may be used to control the encoding behavior.
The primary use of this is incremental encoding of the pixels.
|dst| is unowned but must remain valid for the lifetime of the object.
This returns nullptr on an invalid or unsupported |src|.
Definition at line 481 of file SkPngEncoderImpl.cpp.
|
inline |
Definition at line 39 of file SkPngEncoder.h.