Home | History | Annotate | Download | only in hwui

Lines Matching refs:color

19 #include "utils/Color.h"
29 // "color" is a gamma-encoded sRGB color
30 // After calling this method, the color is stored as a pre-multiplied linear color
31 // if linear blending is enabled. Otherwise, the color is stored as a pre-multiplied
32 // gamma-encoded sRGB color
33 void set(uint32_t color) {
34 a = ((color >> 24) & 0xff) / 255.0f;
35 r = a * EOCF(((color >> 16) & 0xff) / 255.0f);
36 g = a * EOCF(((color >> 8) & 0xff) / 255.0f);
37 b = a * EOCF(((color)&0xff) / 255.0f);
40 // "color" is a gamma-encoded sRGB color
41 // After calling this method, the color is stored as a un-premultiplied linear color
42 // if linear blending is enabled. Otherwise, the color is stored as a un-premultiplied
43 // gamma-encoded sRGB color
44 void setUnPreMultiplied(uint32_t color) {
45 a = ((color >> 24) & 0xff) / 255.0f;
46 r = EOCF(((color >> 16) & 0xff) / 255.0f);
47 g = EOCF(((color >> 8) & 0xff) / 255.0f);
48 b = EOCF(((color)&0xff) / 255.0f);