#include <SkSharingProc.h>
Definition at line 66 of file SkSharingProc.h.
◆ deserializeImage()
sk_sp< SkImage > SkSharingDeserialContext::deserializeImage |
( |
const void * |
data, |
|
|
size_t |
length, |
|
|
void * |
ctx |
|
) |
| |
|
static |
Definition at line 62 of file SkSharingProc.cpp.
63 {
65 SkDebugf(
"SkSharingDeserialContext::deserializeImage arguments invalid %p %zu %p.\n",
67
71 }
73 uint32_t fid;
74
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);
79 return nullptr;
80 }
82 }
83
84
87 if (!codec) {
88 SkDebugf(
"Cannot deserialize image - might not be a PNG.\n");
89 return nullptr;
90 }
95
96 }
99}
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)
SK_API std::unique_ptr< SkCodec > Decode(std::unique_ptr< SkStream >, SkCodec::Result *, SkCodecs::DecodeContext=nullptr)
sk_sp< const SkImage > image
static SkImageInfo MakeN32Premul(int width, int height)
std::vector< sk_sp< SkImage > > fImages
std::shared_ptr< const fml::Mapping > data
◆ fImages
std::vector<sk_sp<SkImage> > SkSharingDeserialContext::fImages |
The documentation for this struct was generated from the following files: