Lines Matching refs:ct
73 static bool SkIsBGRA(SkColorType ct) { in SkIsBGRA() argument
74 SkASSERT(kBGRA_8888_SkColorType == ct || kRGBA_8888_SkColorType == ct); in SkIsBGRA()
75 return kBGRA_8888_SkColorType == ct; in SkIsBGRA()
82 static U8CPU SkGetA32Component(uint32_t value, SkColorType ct) { in SkGetA32Component() argument
83 return (value >> (SkIsBGRA(ct) ? SK_BGRA_A32_SHIFT : SK_RGBA_A32_SHIFT)) & 0xFF; in SkGetA32Component()
85 static U8CPU SkGetR32Component(uint32_t value, SkColorType ct) { in SkGetR32Component() argument
86 return (value >> (SkIsBGRA(ct) ? SK_BGRA_R32_SHIFT : SK_RGBA_R32_SHIFT)) & 0xFF; in SkGetR32Component()
88 static U8CPU SkGetG32Component(uint32_t value, SkColorType ct) { in SkGetG32Component() argument
89 return (value >> (SkIsBGRA(ct) ? SK_BGRA_G32_SHIFT : SK_RGBA_G32_SHIFT)) & 0xFF; in SkGetG32Component()
91 static U8CPU SkGetB32Component(uint32_t value, SkColorType ct) { in SkGetB32Component() argument
92 return (value >> (SkIsBGRA(ct) ? SK_BGRA_B32_SHIFT : SK_RGBA_B32_SHIFT)) & 0xFF; in SkGetB32Component()
97 static void pmcolor_to_rgb24(uint32_t color, uint8_t* rgb, SkColorType ct) { in pmcolor_to_rgb24() argument
98 uint32_t s = SkUnPreMultiply::GetScale(SkGetA32Component(color, ct)); in pmcolor_to_rgb24()
99 rgb[0] = SkUnPreMultiply::ApplyScale(s, SkGetR32Component(color, ct)); in pmcolor_to_rgb24()
100 rgb[1] = SkUnPreMultiply::ApplyScale(s, SkGetG32Component(color, ct)); in pmcolor_to_rgb24()
101 rgb[2] = SkUnPreMultiply::ApplyScale(s, SkGetB32Component(color, ct)); in pmcolor_to_rgb24()
117 SkColorType ct) { in get_neighbor_avg_color() argument
128 a += SkGetA32Component(color, ct); in get_neighbor_avg_color()
129 r += SkGetR32Component(color, ct); in get_neighbor_avg_color()
130 g += SkGetG32Component(color, ct); in get_neighbor_avg_color()
131 b += SkGetB32Component(color, ct); in get_neighbor_avg_color()
157 static size_t pdf_color_component_count(SkColorType ct) { in pdf_color_component_count() argument
158 switch (ct) { in pdf_color_component_count()
274 SkColorTable* ct = bm.getColorTable(); in bitmap_alpha_to_a8() local
275 SkASSERT(ct); in bitmap_alpha_to_a8()
281 *dst++ = SkGetPackedA32((*ct)[*src++]); in bitmap_alpha_to_a8()