Flutter Engine
The Flutter Engine
Functions
CodecBenchPriv.h File Reference
#include "include/core/SkImageInfo.h"

Go to the source code of this file.

Functions

const char * color_type_to_str (SkColorType colorType)
 
const char * alpha_type_to_str (SkAlphaType alphaType)
 

Function Documentation

◆ alpha_type_to_str()

const char * alpha_type_to_str ( SkAlphaType  alphaType)
inline

Definition at line 28 of file CodecBenchPriv.h.

28 {
29 switch (alphaType) {
31 return "";
33 return "Premul";
35 return "Unpremul";
36 default:
37 SkASSERT(false);
38 return "Unknown";
39 }
40}
kUnpremul_SkAlphaType
@ kOpaque_SkAlphaType
pixel is opaque
Definition: SkAlphaType.h:28
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
Definition: SkAlphaType.h:29
#define SkASSERT(cond)
Definition: SkAssert.h:116

◆ color_type_to_str()

const char * color_type_to_str ( SkColorType  colorType)
inline

Definition at line 13 of file CodecBenchPriv.h.

13 {
14 switch (colorType) {
15 case kN32_SkColorType:
16 return "N32";
18 return "565";
20 return "Gray8";
22 return "Alpha8";
23 default:
24 return "Unknown";
25 }
26}
@ kAlpha_8_SkColorType
pixel with alpha in 8-bit byte
Definition: SkColorType.h:21
@ kGray_8_SkColorType
pixel with grayscale level in 8-bit byte
Definition: SkColorType.h:35
@ kRGB_565_SkColorType
pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word
Definition: SkColorType.h:22
static SkColorType colorType(AImageDecoder *decoder, const AImageDecoderHeaderInfo *headerInfo)