1 typedef unsigned int uint32_t;
2 
3 extern const uint32_t gMask_00FF00FF;
4 
SkAlphaMulQ(uint32_t c,unsigned scale)5 uint32_t SkAlphaMulQ(uint32_t c, unsigned scale) {
6     uint32_t mask = gMask_00FF00FF;
7 
8     uint32_t rb = ((c & mask) * scale) >> 8;
9     uint32_t ag = ((c >> 8) & mask) * scale;
10     return (rb & mask) | (ag & ~mask);
11 }
12 
main()13 int main()
14 {
15 }
16