29 const int numRows =
info.height();
32 switch (
info.colorType()) {
35 uint32_t* dstRow = (uint32_t*)
dst;
36 for (
int row = 0; row < numRows; row++) {
38 dstRow = SkTAddOffset<uint32_t>(dstRow, rowBytes);
43 uint16_t* dstRow = (uint16_t*)
dst;
44 for (
int row = 0; row < numRows; row++) {
46 dstRow = SkTAddOffset<uint16_t>(dstRow, rowBytes);
51 uint8_t* dstRow = (uint8_t*)
dst;
52 for (
int row = 0; row < numRows; row++) {
53 memset(dstRow, 0,
width);
54 dstRow = SkTAddOffset<uint8_t>(dstRow, rowBytes);
59 uint64_t* dstRow = (uint64_t*)
dst;
60 for (
int row = 0; row < numRows; row++) {
62 dstRow = SkTAddOffset<uint64_t>(dstRow, rowBytes);
67 SkCodecPrintf(
"Error: Unsupported dst color type for fill(). Doing nothing.\n");
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
#define SkCodecPrintf(...)
@ kBGRA_8888_SkColorType
pixel with 8 bits for blue, green, red, alpha; in 32-bit word
@ kRGBA_F16_SkColorType
pixel with half floats for red, green, blue, alpha;
@ kGray_8_SkColorType
pixel with grayscale level in 8-bit byte
@ kRGB_565_SkColorType
pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word
@ kRGBA_8888_SkColorType
pixel with 8 bits for red, green, blue, alpha; in 32-bit word
static void Fill(const SkImageInfo &info, void *dst, size_t rowBytes, SkCodec::ZeroInitialized zeroInit)
void(* memset64)(uint64_t[], uint64_t, int)
void(* memset16)(uint16_t[], uint16_t, int)
void(* memset32)(uint32_t[], uint32_t, int)