33 auto codec = getCodecForData(
data);
35 printf(
"Failed to create codec for animated image.\n");
39 auto android_codec = SkAndroidCodec::MakeFromCodec(std::move(codec));
40 if (android_codec ==
nullptr) {
41 printf(
"Failed to create codec for animated image.\n");
45 if (target_width == 0 || target_height == 0) {
46 return SkAnimatedImage::Make(std::move(android_codec)).release();
49 return SkAnimatedImage::Make(
50 std::move(android_codec),
51 SkImageInfo::MakeUnknown(target_width, target_height),
52 SkIRect::MakeWH(target_width, target_height),
nullptr)
std::shared_ptr< const fml::Mapping > data