Lines Matching defs:base
52 * Scales base <= 2^N-1 to 2^8-1
53 * @param N [1, 8] the number of bits used by base.
54 * @param base the number to be scaled to [0, 255].
56 template<U8CPU N> static inline U8CPU sk_t_scale255(U8CPU base) {
57 base <<= (8 - N);
58 U8CPU lum = base;
60 lum |= base >> i;
64 template<> /*static*/ inline U8CPU sk_t_scale255<1>(U8CPU base) {
65 return base * 0xFF;
67 template<> /*static*/ inline U8CPU sk_t_scale255<2>(U8CPU base) {
68 return base * 0x55;
70 template<> /*static*/ inline U8CPU sk_t_scale255<4>(U8CPU base) {
71 return base * 0x11;
73 template<> /*static*/ inline U8CPU sk_t_scale255<8>(U8CPU base) {
74 return base;