Flutter Engine
The Flutter Engine
|
#include "include/core/SkColor.h"
#include "include/core/SkColorPriv.h"
#include "include/private/base/SkTo.h"
Go to the source code of this file.
Typedefs | |
typedef uint16_t | SkPMColor16 |
using | SkPMColor4f = SkRGBA4f< kPremul_SkAlphaType > |
Variables | |
constexpr SkPMColor4f | SK_PMColor4fTRANSPARENT = { 0, 0, 0, 0 } |
constexpr SkPMColor4f | SK_PMColor4fBLACK = { 0, 0, 0, 1 } |
constexpr SkPMColor4f | SK_PMColor4fWHITE = { 1, 1, 1, 1 } |
constexpr SkPMColor4f | SK_PMColor4fILLEGAL |
#define SK_A4444_SHIFT 0 |
Definition at line 351 of file SkColorData.h.
#define SK_B16_BITS 5 |
Definition at line 20 of file SkColorData.h.
#define SK_B16_MASK ((1 << SK_B16_BITS) - 1) |
Definition at line 28 of file SkColorData.h.
#define SK_B16_MASK_IN_PLACE (SK_B16_MASK << SK_B16_SHIFT) |
Definition at line 151 of file SkColorData.h.
#define SK_B16_SHIFT 0 |
Definition at line 24 of file SkColorData.h.
#define SK_B4444_SHIFT 4 |
Definition at line 354 of file SkColorData.h.
#define SK_G16_BITS 6 |
Definition at line 19 of file SkColorData.h.
#define SK_G16_MASK ((1 << SK_G16_BITS) - 1) |
Definition at line 27 of file SkColorData.h.
#define SK_G16_MASK_IN_PLACE (SK_G16_MASK << SK_G16_SHIFT) |
Definition at line 150 of file SkColorData.h.
#define SK_G16_SHIFT (SK_B16_BITS) |
Definition at line 23 of file SkColorData.h.
#define SK_G4444_SHIFT 8 |
Definition at line 353 of file SkColorData.h.
#define SK_ITU_BT709_LUM_COEFF_B (0.0722f) |
Definition at line 105 of file SkColorData.h.
#define SK_ITU_BT709_LUM_COEFF_G (0.7152f) |
Definition at line 104 of file SkColorData.h.
#define SK_ITU_BT709_LUM_COEFF_R (0.2126f) |
See ITU-R Recommendation BT.709 at http://www.itu.int/rec/R-REC-BT.709/ .
Definition at line 103 of file SkColorData.h.
#define SK_LUM_COEFF_B SK_ITU_BT709_LUM_COEFF_B |
Definition at line 112 of file SkColorData.h.
#define SK_LUM_COEFF_G SK_ITU_BT709_LUM_COEFF_G |
Definition at line 111 of file SkColorData.h.
#define SK_LUM_COEFF_R SK_ITU_BT709_LUM_COEFF_R |
A float value which specifies this channel's contribution to luminance.
Definition at line 110 of file SkColorData.h.
#define SK_R16_BITS 5 |
Definition at line 18 of file SkColorData.h.
#define SK_R16_MASK ((1 << SK_R16_BITS) - 1) |
Definition at line 26 of file SkColorData.h.
#define SK_R16_MASK_IN_PLACE (SK_R16_MASK << SK_R16_SHIFT) |
Definition at line 149 of file SkColorData.h.
#define SK_R16_SHIFT (SK_B16_BITS + SK_G16_BITS) |
Definition at line 22 of file SkColorData.h.
#define SK_R4444_SHIFT 12 |
Definition at line 352 of file SkColorData.h.
Definition at line 52 of file SkColorData.h.
#define SkB32ToB16 | ( | b | ) | SkB32ToB16_MACRO(b) |
Definition at line 314 of file SkColorData.h.
#define SkB32ToB16_MACRO | ( | b | ) | ((unsigned)(b) >> (SK_B32_BITS - SK_B16_BITS)) |
Definition at line 296 of file SkColorData.h.
#define SkG32ToG16 | ( | g | ) | SkG32ToG16_MACRO(g) |
Definition at line 313 of file SkColorData.h.
#define SkG32ToG16_MACRO | ( | g | ) | ((unsigned)(g) >> (SK_G32_BITS - SK_G16_BITS)) |
Definition at line 295 of file SkColorData.h.
#define SkGetPackedA4444 | ( | c | ) | (((unsigned)(c) >> SK_A4444_SHIFT) & 0xF) |
Definition at line 361 of file SkColorData.h.
#define SkGetPackedB16 | ( | color | ) | (((unsigned)(color) >> SK_B16_SHIFT) & SK_B16_MASK) |
Definition at line 32 of file SkColorData.h.
#define SkGetPackedB4444 | ( | c | ) | (((unsigned)(c) >> SK_B4444_SHIFT) & 0xF) |
Definition at line 364 of file SkColorData.h.
#define SkGetPackedG16 | ( | color | ) | (((unsigned)(color) >> SK_G16_SHIFT) & SK_G16_MASK) |
Definition at line 31 of file SkColorData.h.
#define SkGetPackedG4444 | ( | c | ) | (((unsigned)(c) >> SK_G4444_SHIFT) & 0xF) |
Definition at line 363 of file SkColorData.h.
#define SkGetPackedR16 | ( | color | ) | (((unsigned)(color) >> SK_R16_SHIFT) & SK_R16_MASK) |
Definition at line 30 of file SkColorData.h.
#define SkGetPackedR4444 | ( | c | ) | (((unsigned)(c) >> SK_R4444_SHIFT) & 0xF) |
Definition at line 362 of file SkColorData.h.
#define SkPacked16ToB32 | ( | c | ) | SkB16ToB32(SkGetPackedB16(c)) |
Definition at line 48 of file SkColorData.h.
#define SkPacked16ToG32 | ( | c | ) | SkG16ToG32(SkGetPackedG16(c)) |
Definition at line 47 of file SkColorData.h.
#define SkPacked16ToR32 | ( | c | ) | SkR16ToR32(SkGetPackedR16(c)) |
Definition at line 46 of file SkColorData.h.
#define SkPacked4444ToA32 | ( | c | ) | SkReplicateNibble(SkGetPackedA4444(c)) |
Definition at line 366 of file SkColorData.h.
#define SkR32ToR16 | ( | r | ) | SkR32ToR16_MACRO(r) |
Definition at line 312 of file SkColorData.h.
#define SkR32ToR16_MACRO | ( | r | ) | ((unsigned)(r) >> (SK_R32_BITS - SK_R16_BITS)) |
Definition at line 294 of file SkColorData.h.
typedef uint16_t SkPMColor16 |
Definition at line 348 of file SkColorData.h.
using SkPMColor4f = SkRGBA4f<kPremul_SkAlphaType> |
Definition at line 376 of file SkColorData.h.
Definition at line 136 of file SkColorData.h.
Calculates 256 - (value * alpha256) / 255 in range [0,256], for [0,255] value and [0,256] alpha256.
Definition at line 128 of file SkColorData.h.
|
inlinestatic |
Definition at line 42 of file SkColorData.h.
Definition at line 274 of file SkColorData.h.
Computes the luminance from the given r, g, and b in accordance with SK_LUM_COEFF_X. For correct results, r, g, and b should be in linear space.
Definition at line 118 of file SkColorData.h.
|
inlinestatic |
Nearly the same as SkFourByteInterp, but faster and a touch more accurate, due to better srcWeight scaling to [0, 256].
Definition at line 260 of file SkColorData.h.
|
inlinestatic |
Same as SkFourByteInterp256, but faster.
Definition at line 247 of file SkColorData.h.
|
inlinestatic |
Definition at line 222 of file SkColorData.h.
Abstract 4-byte interpolation, implemented on top of SkPMColor utility functions. Third parameter controls blending of the first two: (src, dst, 0) returns dst (src, dst, 0xFF) returns src
Definition at line 177 of file SkColorData.h.
Abstract 4-byte interpolation, implemented on top of SkPMColor utility functions. Third parameter controls blending of the first two: (src, dst, 0) returns dst (src, dst, 0xFF) returns src scale is [0..256], unlike SkFourByteInterp which takes [0..255]
Definition at line 162 of file SkColorData.h.
|
inlinestatic |
Definition at line 38 of file SkColorData.h.
Definition at line 324 of file SkColorData.h.
Definition at line 74 of file SkColorData.h.
Definition at line 65 of file SkColorData.h.
|
inlinestatic |
Definition at line 141 of file SkColorData.h.
Definition at line 332 of file SkColorData.h.
Definition at line 317 of file SkColorData.h.
Definition at line 368 of file SkColorData.h.
Interpolates between colors src and dst using [0,256] scale.
Definition at line 270 of file SkColorData.h.
|
inlinestatic |
Definition at line 34 of file SkColorData.h.
|
inlinestatic |
Definition at line 356 of file SkColorData.h.
|
inlinestatic |
0xAARRGGBB -> 0x00AA00GG00RR00BB (note, ARGB -> AGRB)
Definition at line 195 of file SkColorData.h.
|
inlinestatic |
0xAARRGGBB -> 0x00AA00GG, 0x00RR00BB
Definition at line 185 of file SkColorData.h.
|
inlinestatic |
Definition at line 91 of file SkColorData.h.
|
inlinestatic |
Definition at line 57 of file SkColorData.h.
|
inlinestatic |
Definition at line 83 of file SkColorData.h.
|
inlinestatic |
0xAAxxGGxx, 0xRRxxBBxx-> 0xAARRGGBB
Definition at line 206 of file SkColorData.h.
|
inlinestatic |
0xAAxxGGxxRRxxBBxx -> 0xAARRGGBB (note, AGRB -> ARGB)
Definition at line 215 of file SkColorData.h.
|
constexpr |
Definition at line 379 of file SkColorData.h.
|
constexpr |
Definition at line 381 of file SkColorData.h.
|
constexpr |
Definition at line 378 of file SkColorData.h.
|
constexpr |
Definition at line 380 of file SkColorData.h.