Flutter Engine
The Flutter Engine
Enumerations | Variables
SkColorType.h File Reference
#include "include/core/SkTypes.h"

Go to the source code of this file.

Enumerations

enum  SkColorType : int {
  kUnknown_SkColorType , kAlpha_8_SkColorType , kRGB_565_SkColorType , kARGB_4444_SkColorType ,
  kRGBA_8888_SkColorType , kRGB_888x_SkColorType , kBGRA_8888_SkColorType , kRGBA_1010102_SkColorType ,
  kBGRA_1010102_SkColorType , kRGB_101010x_SkColorType , kBGR_101010x_SkColorType , kBGR_101010x_XR_SkColorType ,
  kBGRA_10101010_XR_SkColorType , kRGBA_10x6_SkColorType , kGray_8_SkColorType , kRGBA_F16Norm_SkColorType ,
  kRGBA_F16_SkColorType , kRGBA_F32_SkColorType , kR8G8_unorm_SkColorType , kA16_float_SkColorType ,
  kR16G16_float_SkColorType , kA16_unorm_SkColorType , kR16G16_unorm_SkColorType , kR16G16B16A16_unorm_SkColorType ,
  kSRGBA_8888_SkColorType , kR8_unorm_SkColorType , kLastEnum_SkColorType = kR8_unorm_SkColorType
}
 

Variables

static constexpr int kSkColorTypeCnt = static_cast<int>(kLastEnum_SkColorType) + 1
 

Enumeration Type Documentation

◆ SkColorType

enum SkColorType : int

Describes how pixel bits encode color. A pixel may be an alpha mask, a grayscale, RGB, or ARGB.

kN32_SkColorType selects the native 32-bit ARGB format for the current configuration. This can lead to inconsistent results across platforms, so use with caution.

Enumerator
kUnknown_SkColorType 

uninitialized

kAlpha_8_SkColorType 

pixel with alpha in 8-bit byte

kRGB_565_SkColorType 

pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word

kARGB_4444_SkColorType 

pixel with 4 bits for alpha, red, green, blue; in 16-bit word

kRGBA_8888_SkColorType 

pixel with 8 bits for red, green, blue, alpha; in 32-bit word

kRGB_888x_SkColorType 

pixel with 8 bits each for red, green, blue; in 32-bit word

kBGRA_8888_SkColorType 

pixel with 8 bits for blue, green, red, alpha; in 32-bit word

kRGBA_1010102_SkColorType 

10 bits for red, green, blue; 2 bits for alpha; in 32-bit word

kBGRA_1010102_SkColorType 

10 bits for blue, green, red; 2 bits for alpha; in 32-bit word

kRGB_101010x_SkColorType 

pixel with 10 bits each for red, green, blue; in 32-bit word

kBGR_101010x_SkColorType 

pixel with 10 bits each for blue, green, red; in 32-bit word

kBGR_101010x_XR_SkColorType 

pixel with 10 bits each for blue, green, red; in 32-bit word, extended range

kBGRA_10101010_XR_SkColorType 

pixel with 10 bits each for blue, green, red, alpha; in 64-bit word, extended range

kRGBA_10x6_SkColorType 

pixel with 10 used bits (most significant) followed by 6 unused

kGray_8_SkColorType 

pixel with grayscale level in 8-bit byte

kRGBA_F16Norm_SkColorType 

pixel with half floats in [0,1] for red, green, blue, alpha;

kRGBA_F16_SkColorType 

pixel with half floats for red, green, blue, alpha;

kRGBA_F32_SkColorType 

pixel using C float for red, green, blue, alpha; in 128-bit word

kR8G8_unorm_SkColorType 

pixel with a uint8_t for red and green

kA16_float_SkColorType 

pixel with a half float for alpha

kR16G16_float_SkColorType 

pixel with a half float for red and green

kA16_unorm_SkColorType 

pixel with a little endian uint16_t for alpha

kR16G16_unorm_SkColorType 

pixel with a little endian uint16_t for red and green

kR16G16B16A16_unorm_SkColorType 

pixel with a little endian uint16_t for red, green, blue

kSRGBA_8888_SkColorType 
kR8_unorm_SkColorType 
kLastEnum_SkColorType 

last valid value

Definition at line 19 of file SkColorType.h.

19 : int {
20 kUnknown_SkColorType, //!< uninitialized
21 kAlpha_8_SkColorType, //!< pixel with alpha in 8-bit byte
22 kRGB_565_SkColorType, //!< pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word
23 kARGB_4444_SkColorType, //!< pixel with 4 bits for alpha, red, green, blue; in 16-bit word
24 kRGBA_8888_SkColorType, //!< pixel with 8 bits for red, green, blue, alpha; in 32-bit word
25 kRGB_888x_SkColorType, //!< pixel with 8 bits each for red, green, blue; in 32-bit word
26 kBGRA_8888_SkColorType, //!< pixel with 8 bits for blue, green, red, alpha; in 32-bit word
27 kRGBA_1010102_SkColorType, //!< 10 bits for red, green, blue; 2 bits for alpha; in 32-bit word
28 kBGRA_1010102_SkColorType, //!< 10 bits for blue, green, red; 2 bits for alpha; in 32-bit word
29 kRGB_101010x_SkColorType, //!< pixel with 10 bits each for red, green, blue; in 32-bit word
30 kBGR_101010x_SkColorType, //!< pixel with 10 bits each for blue, green, red; in 32-bit word
31 kBGR_101010x_XR_SkColorType, //!< pixel with 10 bits each for blue, green, red; in 32-bit word, extended range
32 kBGRA_10101010_XR_SkColorType, //!< pixel with 10 bits each for blue, green, red, alpha; in 64-bit word, extended range
33 kRGBA_10x6_SkColorType, //!< pixel with 10 used bits (most significant) followed by 6 unused
34 // bits for red, green, blue, alpha; in 64-bit word
35 kGray_8_SkColorType, //!< pixel with grayscale level in 8-bit byte
36 kRGBA_F16Norm_SkColorType, //!< pixel with half floats in [0,1] for red, green, blue, alpha;
37 // in 64-bit word
38 kRGBA_F16_SkColorType, //!< pixel with half floats for red, green, blue, alpha;
39 // in 64-bit word
40 kRGBA_F32_SkColorType, //!< pixel using C float for red, green, blue, alpha; in 128-bit word
41
42 // The following 6 colortypes are just for reading from - not for rendering to
43 kR8G8_unorm_SkColorType, //!< pixel with a uint8_t for red and green
44
45 kA16_float_SkColorType, //!< pixel with a half float for alpha
46 kR16G16_float_SkColorType, //!< pixel with a half float for red and green
47
48 kA16_unorm_SkColorType, //!< pixel with a little endian uint16_t for alpha
49 kR16G16_unorm_SkColorType, //!< pixel with a little endian uint16_t for red and green
50 kR16G16B16A16_unorm_SkColorType, //!< pixel with a little endian uint16_t for red, green, blue
51 // and alpha
52
55
56 kLastEnum_SkColorType = kR8_unorm_SkColorType, //!< last valid value
57
58#if SK_PMCOLOR_BYTE_ORDER(B,G,R,A)
59 kN32_SkColorType = kBGRA_8888_SkColorType,//!< native 32-bit BGRA encoding
60
61#elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A)
62 kN32_SkColorType = kRGBA_8888_SkColorType,//!< native 32-bit RGBA encoding
63
64#else
65 #error "SK_*32_SHIFT values must correspond to BGRA or RGBA byte order"
66#endif
67};
@ kR16G16B16A16_unorm_SkColorType
pixel with a little endian uint16_t for red, green, blue
Definition: SkColorType.h:50
@ kRGBA_10x6_SkColorType
pixel with 10 used bits (most significant) followed by 6 unused
Definition: SkColorType.h:33
@ kR8_unorm_SkColorType
Definition: SkColorType.h:54
@ kBGR_101010x_SkColorType
pixel with 10 bits each for blue, green, red; in 32-bit word
Definition: SkColorType.h:30
@ kARGB_4444_SkColorType
pixel with 4 bits for alpha, red, green, blue; in 16-bit word
Definition: SkColorType.h:23
@ kR8G8_unorm_SkColorType
pixel with a uint8_t for red and green
Definition: SkColorType.h:43
@ kBGRA_8888_SkColorType
pixel with 8 bits for blue, green, red, alpha; in 32-bit word
Definition: SkColorType.h:26
@ kA16_unorm_SkColorType
pixel with a little endian uint16_t for alpha
Definition: SkColorType.h:48
@ kRGBA_F16_SkColorType
pixel with half floats for red, green, blue, alpha;
Definition: SkColorType.h:38
@ kAlpha_8_SkColorType
pixel with alpha in 8-bit byte
Definition: SkColorType.h:21
@ kRGB_101010x_SkColorType
pixel with 10 bits each for red, green, blue; in 32-bit word
Definition: SkColorType.h:29
@ kLastEnum_SkColorType
last valid value
Definition: SkColorType.h:56
@ kSRGBA_8888_SkColorType
Definition: SkColorType.h:53
@ 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
@ kBGRA_10101010_XR_SkColorType
pixel with 10 bits each for blue, green, red, alpha; in 64-bit word, extended range
Definition: SkColorType.h:32
@ kRGBA_8888_SkColorType
pixel with 8 bits for red, green, blue, alpha; in 32-bit word
Definition: SkColorType.h:24
@ kRGB_888x_SkColorType
pixel with 8 bits each for red, green, blue; in 32-bit word
Definition: SkColorType.h:25
@ kBGRA_1010102_SkColorType
10 bits for blue, green, red; 2 bits for alpha; in 32-bit word
Definition: SkColorType.h:28
@ kA16_float_SkColorType
pixel with a half float for alpha
Definition: SkColorType.h:45
@ kRGBA_F32_SkColorType
pixel using C float for red, green, blue, alpha; in 128-bit word
Definition: SkColorType.h:40
@ kRGBA_1010102_SkColorType
10 bits for red, green, blue; 2 bits for alpha; in 32-bit word
Definition: SkColorType.h:27
@ kBGR_101010x_XR_SkColorType
pixel with 10 bits each for blue, green, red; in 32-bit word, extended range
Definition: SkColorType.h:31
@ kR16G16_unorm_SkColorType
pixel with a little endian uint16_t for red and green
Definition: SkColorType.h:49
@ kRGBA_F16Norm_SkColorType
pixel with half floats in [0,1] for red, green, blue, alpha;
Definition: SkColorType.h:36
@ kUnknown_SkColorType
uninitialized
Definition: SkColorType.h:20
@ kR16G16_float_SkColorType
pixel with a half float for red and green
Definition: SkColorType.h:46

Variable Documentation

◆ kSkColorTypeCnt

constexpr int kSkColorTypeCnt = static_cast<int>(kLastEnum_SkColorType) + 1
staticconstexpr

Definition at line 68 of file SkColorType.h.