Home | History | Annotate | Download | only in core

Lines Matching refs:dither

71 static inline SkPMColor SkDitherARGB32For565(SkPMColor c, unsigned dither)
73 SkASSERT(dither <= SK_DitherValueMax565);
76 dither = SkAlphaMul(dither, SkAlpha255To256(sa));
81 sr = SkDITHER_R32_FOR_565(sr, dither);
82 sg = SkDITHER_G32_FOR_565(sg, dither);
83 sb = SkDITHER_B32_FOR_565(sb, dither);
88 static inline SkPMColor SkDitherRGB32For565(SkPMColor c, unsigned dither)
90 SkASSERT(dither <= SK_DitherValueMax565);
95 sr = SkDITHER_R32_FOR_565(sr, dither);
96 sg = SkDITHER_G32_FOR_565(sg, dither);
97 sb = SkDITHER_B32_FOR_565(sb, dither);
103 unsigned dither)
105 SkASSERT(dither <= SK_DitherValueMax565);
106 r = SkDITHER_R32To565(r, dither);
107 g = SkDITHER_G32To565(g, dither);
108 b = SkDITHER_B32To565(b, dither);
112 static inline uint16_t SkDitherRGB32To565(SkPMColor c, unsigned dither)
114 SkASSERT(dither <= SK_DitherValueMax565);
119 sr = SkDITHER_R32To565(sr, dither);
120 sg = SkDITHER_G32To565(sg, dither);
121 sb = SkDITHER_B32To565(sb, dither);
126 static inline uint16_t SkDitherARGB32To565(U8CPU sa, SkPMColor c, unsigned dither)
128 SkASSERT(dither <= SK_DitherValueMax565);
129 dither = SkAlphaMul(dither, SkAlpha255To256(sa));
134 sr = SkDITHER_R32To565(sr, dither);
135 sg = SkDITHER_G32To565(sg, dither);
136 sb = SkDITHER_B32To565(sb, dither);
144 U8CPU b, unsigned dither)
146 dither = SkAlphaMul(dither, SkAlpha255To256(a));
148 a = SkDITHER_A32To4444(a, dither);
149 r = SkDITHER_R32To4444(r, dither);
150 g = SkDITHER_G32To4444(g, dither);
151 b = SkDITHER_B32To4444(b, dither);
156 static inline SkPMColor16 SkDitherARGB32To4444(SkPMColor c, unsigned dither)
163 dither = SkAlphaMul(dither, SkAlpha255To256(a));
165 a = SkDITHER_A32To4444(a, dither);
166 r = SkDITHER_R32To4444(r, dither);
167 g = SkDITHER_G32To4444(g, dither);
168 b = SkDITHER_B32To4444(b, dither);
173 // TODO: need dither routines for 565 -> 4444