16 : fData(
SkRef(encoded))
17 , fSampleSize(sampleSize)
20 fName.
printf(
"AndroidCodec_%s_SampleSize%d", baseName.
c_str(), sampleSize);
33 SkISize scaledSize = codec->getSampledDimensions(fSampleSize);
44 std::unique_ptr<SkAndroidCodec> codec;
46 options.fSampleSize = fSampleSize;
47 for (
int i = 0;
i < n;
i++) {
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
void onDraw(int n, SkCanvas *canvas) override
void onDelayedSetup() override
bool isSuitableFor(Backend backend) override
const char * onGetName() override
AndroidCodecBench(SkString basename, SkData *encoded, int sampleSize)
static std::unique_ptr< SkAndroidCodec > MakeFromData(sk_sp< SkData >, SkPngChunkReader *=nullptr)
void * reset(size_t size=0, OnShrink shrink=kAlloc_OnShrink)
void printf(const char format[],...) SK_PRINTF_LIKE(2
const char * c_str() const
SkImageInfo makeAlphaType(SkAlphaType newAlphaType) const
size_t minRowBytes() const
SkImageInfo makeDimensions(SkISize newSize) const
size_t computeMinByteSize() const
SkAlphaType alphaType() const
SkImageInfo makeColorType(SkColorType newColorType) const