22 uint32_t originalId = img->
uniqueID();
38 tempProc.
fImageProc = collectNonTextureImagesProc;
53 if (replacementImage) {
54 img = replacementImage->get();
65 SkDebugf(
"SkSharingDeserialContext::deserializeImage arguments invalid %p %zu %p.\n",
75 if (
length ==
sizeof(fid)) {
76 memcpy(&fid,
data,
sizeof(fid));
77 if (fid >= context->
fImages.size()) {
78 SkDebugf(
"Cannot deserialize using id, We do not have the data for image %u.\n", fid);
88 SkDebugf(
"Cannot deserialize image - might not be a PNG.\n");
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
void allocPixels(const SkImageInfo &info, size_t rowBytes)
sk_sp< SkImage > asImage() const
static sk_sp< SkData > MakeWithCopy(const void *data, size_t length)
static sk_sp< SkData > MakeEmpty()
uint32_t uniqueID() const
sk_sp< SkImage > makeNonTextureImage(GrDirectContext *=nullptr) const
sk_sp< SkData > serialize(const SkSerialProcs *procs=nullptr) const
V * find(const K &key) const
SK_API std::unique_ptr< SkCodec > Decode(std::unique_ptr< SkStream >, SkCodec::Result *, SkCodecs::DecodeContext=nullptr)
SK_API bool Encode(SkWStream *dst, const SkPixmap &src, const Options &options)
sk_sp< const SkImage > image
static SkImageInfo MakeN32Premul(int width, int height)
SkSerialImageProc fImageProc
std::vector< sk_sp< SkImage > > fImages
static sk_sp< SkImage > deserializeImage(const void *data, size_t length, void *ctx)
static sk_sp< SkData > serializeImage(SkImage *img, void *ctx)
static void collectNonTextureImagesFromPicture(const SkPicture *pic, SkSharingSerialContext *sharingCtx)
skia_private::THashMap< uint32_t, sk_sp< SkImage > > fNonTexMap
skia_private::THashMap< uint32_t, int > fImageMap
std::shared_ptr< const fml::Mapping > data