Go to the source code of this file.
|
static WEBP_CSP_MODE | webp_decode_mode (SkColorType dstCT, bool premultiply) |
|
static bool | is_8888 (SkColorType colorType) |
|
static void | blend_line (SkColorType dstCT, void *dst, SkColorType srcCT, const void *src, SkAlphaType dstAt, bool srcHasAlpha, int width) |
|
SK_API bool | SkWebpDecoder::IsWebp (const void *, size_t) |
|
SK_API std::unique_ptr< SkCodec > | SkWebpDecoder::Decode (std::unique_ptr< SkStream >, SkCodec::Result *, SkCodecs::DecodeContext=nullptr) |
|
SK_API std::unique_ptr< SkCodec > | SkWebpDecoder::Decode (sk_sp< SkData >, SkCodec::Result *, SkCodecs::DecodeContext=nullptr) |
|
◆ blend_line()
Definition at line 338 of file SkWebpCodec.cpp.
342 {
344 src_ctx = {
const_cast<void*
>(
src), 0 };
345
347
348 p.appendLoadDst(dstCT, &dst_ctx);
350 p.append(SkRasterPipelineOp::premul_dst);
351 }
352
353 p.appendLoad(srcCT, &src_ctx);
354 if (srcHasAlpha) {
356 }
357
358 p.append(SkRasterPipelineOp::srcover);
359
361 p.append(SkRasterPipelineOp::unpremul);
362 }
363 p.appendStore(dstCT, &dst_ctx);
364
366}
static uint32_t premul(uint32_t color)
◆ is_8888()
Definition at line 327 of file SkWebpCodec.cpp.
327 {
331 return true;
332 default:
333 return false;
334 }
335}
@ kBGRA_8888_SkColorType
pixel with 8 bits for blue, green, red, alpha; in 32-bit word
@ kRGBA_8888_SkColorType
pixel with 8 bits for red, green, blue, alpha; in 32-bit word
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)
◆ webp_decode_mode()
static WEBP_CSP_MODE webp_decode_mode |
( |
SkColorType |
dstCT, |
|
|
bool |
premultiply |
|
) |
| |
|
static |
Definition at line 200 of file SkWebpCodec.cpp.
200 {
201 switch (dstCT) {
203 return premultiply ? MODE_bgrA : MODE_BGRA;
205 return premultiply ? MODE_rgbA : MODE_RGBA;
207 return MODE_RGB_565;
208 default:
209 return MODE_LAST;
210 }
211}
@ kRGB_565_SkColorType
pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word