19 const char* path =
"images/blendBG.webp";
22 ERRORF(r,
"Failed to open/decode %s", path);
35 for (
int i = 0; i < codec->getFrameCount(); i++) {
40 ERRORF(r,
"Failed to decode %s frame %i (premul) - error %s", path, i,
46 if (!codec->getFrameInfo(i, &frameInfo)) {
47 ERRORF(r,
"Failed to getFrameInfo for %s frame %i", path, i);
53 result = codec->getPixels(premulInfo.makeAlphaType(alphaType), changeBm.
getPixels(),
56 ERRORF(r,
"Failed to decode %s frame %i (change) - error %s", path, i,
62 " with mismatched SkAlphaType", path, i);
sk_sp< SkData > GetResourceAsData(const char *resource)
@ kOpaque_SkAlphaType
pixel is opaque
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
#define DEF_TEST(name, reporter)
#define REPORTER_ASSERT(r, cond,...)
void allocPixels(const SkImageInfo &info, size_t rowBytes)
const SkPixmap & pixmap() const
static std::unique_ptr< SkCodec > MakeFromData(sk_sp< SkData >, SkSpan< const SkCodecs::Decoder > decoders, SkPngChunkReader *=nullptr)
static const char * ResultToString(Result)