26 : fSourceFilename(filename)
49 const char* fSourceFilename;
85#define PNG(FLAG, ZLIBLEVEL) [](SkWStream* d, const SkPixmap& s) { \
86 return encode_png(d, s, SkPngEncoder::FilterFlag::FLAG, ZLIBLEVEL); }
88static const char*
srcs[2] = {
"images/mandrill_512.png",
"images/color_wheel.jpg"};
static const char * srcs[2]
static bool encode_webp_lossy(SkWStream *dst, const SkPixmap &src)
DEF_BENCH(return new EncodeBench(srcs[0], &encode_jpeg, "JPEG"))
static bool encode_jpeg(SkWStream *dst, const SkPixmap &src)
#define PNG(FLAG, ZLIBLEVEL)
static bool encode_png(SkWStream *dst, const SkPixmap &src, SkPngEncoder::FilterFlag filters, int zlibLevel)
static bool encode_webp_lossless(SkWStream *dst, const SkPixmap &src)
SkAssertResult(font.textToGlyphs("Hello", 5, SkTextEncoding::kUTF8, glyphs, std::size(glyphs))==count)
SK_API SkString SkStringPrintf(const char *format,...) SK_PRINTF_LIKE(1
Creates a new string and writes into it using a printf()-style format.
void onDraw(int loops, SkCanvas *) override
bool(*)(SkWStream *, const SkPixmap &) Encoder
const char * onGetName() override
bool isSuitableFor(Backend backend) override
void onDelayedSetup() override
EncodeBench(const char *filename, Encoder encoder, const char *encoderName)
bool peekPixels(SkPixmap *pixmap) const
const char * c_str() const
SK_API bool Encode(SkWStream *dst, const SkPixmap &src, const Options &options)
SK_API bool Encode(SkWStream *dst, const SkPixmap &src, const Options &options)
SK_API bool Encode(SkWStream *dst, const SkPixmap &src, const Options &options)