Go to the source code of this file.
◆ GrColor_ILLEGAL
Since premultiplied means that alpha >= color, we construct a color with each component==255 and alpha == 0 to be "illegal"
Definition at line 68 of file GrColor.h.
◆ GrColor_SHIFT_A
#define GrColor_SHIFT_A 24 |
◆ GrColor_SHIFT_B
#define GrColor_SHIFT_B 16 |
◆ GrColor_SHIFT_G
#define GrColor_SHIFT_G 8 |
◆ GrColor_SHIFT_R
#define GrColor_SHIFT_R 0 |
◆ GrColorUnpackA
◆ GrColorUnpackB
◆ GrColorUnpackG
◆ GrColorUnpackR
◆ GrColor
GrColor is 4 bytes for R, G, B, A, in a specific order defined below. Whether the color is premultiplied or not depends on the context in which it is being used.
Definition at line 25 of file GrColor.h.
◆ GrColorPackRGBA()
static GrColor GrColorPackRGBA |
( |
unsigned |
r, |
|
|
unsigned |
g, |
|
|
unsigned |
b, |
|
|
unsigned |
a |
|
) |
| |
|
inlinestatic |
Pack 4 components (RGBA) into a GrColor int
Definition at line 46 of file GrColor.h.
◆ GrNormalizeByteToFloat()
static float GrNormalizeByteToFloat |
( |
uint8_t |
value | ) |
|
|
inlinestatic |
Normalizes and coverts an uint8_t to a float. [0, 255] -> [0.0, 1.0]
Definition at line 71 of file GrColor.h.
71 {
72 static const float ONE_OVER_255 = 1.f / 255.f;
73 return value * ONE_OVER_255;
74}
◆ SkPMColor4f_toFP16()
static uint64_t SkPMColor4f_toFP16 |
( |
const SkPMColor4f & |
color | ) |
|
|
inlinestatic |
Definition at line 82 of file GrColor.h.
82 {
83 uint64_t halfColor;
85 return halfColor;
86}
SIN Vec< N, uint16_t > to_half(const Vec< N, float > &x)
static SKVX_ALWAYS_INLINE Vec Load(const void *ptr)
◆ SkPMColor4fFitsInBytes()
static bool SkPMColor4fFitsInBytes |
( |
const SkPMColor4f & |
color | ) |
|
|
inlinestatic |
Used to pick vertex attribute types.
Definition at line 77 of file GrColor.h.
77 {
78
79 return color.fitsInBytes();
80}