17 "Pretend our destination is zero-intialized, simulating Android?");
23 , fData(
SkRef(encoded))
51 std::unique_ptr<SkCodec> codec;
53 if (FLAGS_zero_init) {
56 for (
int i = 0;
i < n;
i++) {
const char * alpha_type_to_str(SkAlphaType alphaType)
const char * color_type_to_str(SkColorType colorType)
static DEFINE_bool(zero_init, false, "Pretend our destination is zero-intialized, simulating Android?")
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)
bool isSuitableFor(Backend backend) override
void onDelayedSetup() override
const char * onGetName() override
void onDraw(int n, SkCanvas *canvas) override
CodecBench(SkString basename, SkData *encoded, SkColorType colorType, SkAlphaType alphaType)
void * reset(size_t size=0, OnShrink shrink=kAlloc_OnShrink)
static std::unique_ptr< SkCodec > MakeFromData(sk_sp< SkData >, SkSpan< const SkCodecs::Decoder > decoders, SkPngChunkReader *=nullptr)
void printf(const char format[],...) SK_PRINTF_LIKE(2
const char * c_str() const
SkImageInfo makeAlphaType(SkAlphaType newAlphaType) const
size_t minRowBytes() const
SkImageInfo makeColorSpace(sk_sp< SkColorSpace > cs) const
size_t computeMinByteSize() const
SkImageInfo makeColorType(SkColorType newColorType) const