Lines Matching defs:Sk4px
15 class Sk4px : public Sk16b {
17 Sk4px(SkAlpha a) : INHERITED(a) {} // Duplicate 16x: a -> aaaa aaaa aaaa aaaa
18 Sk4px(SkPMColor); // Duplicate 4x: argb -> argb argb argb argb
19 Sk4px(const Sk16b& v) : INHERITED(v) {}
21 Sk4px alphas() const; // ARGB argb XYZW xyzw -> AAAA aaaa XXXX xxxx
24 Sk4px zeroColors() const; // ARGB argb XYZW xyzw -> A000 a000 X000 x000
25 Sk4px zeroAlphas() const; // ARGB argb XYZW xyzw -> 0RGB 0rgb 0YZW 0yzw
27 Sk4px inv() const { return Sk16b(255) - *this; }
30 static Sk4px Load4(const SkPMColor[4]); // PMColor[4] -> ARGB argb XYZW xyzw
31 static Sk4px Load2(const SkPMColor[2]); // PMColor[2] -> ARGB argb ???? ????
32 static Sk4px Load1(const SkPMColor[1]); // PMColor[1] -> ARGB ???? ???? ????
34 // Ditto for Alphas... Load2Alphas fills the low two lanes of Sk4px.
35 static Sk4px Load4Alphas(const SkAlpha[4]); // AaXx -> AAAA aaaa XXXX xxxx
36 static Sk4px Load2Alphas(const SkAlpha[2]); // Aa -> AAAA aaaa ???? ????
49 Sk4px addNarrowHi(const Sk16h&) const;
51 Sk4px div255TruncNarrow() const { return this->addNarrowHi(*this >> 8); }
52 Sk4px div255RoundNarrow() const {
53 return Sk4px::Wide(*this + Sk16h(128)).div255TruncNarrow();
69 // fn should take an Sk4px (4 src pixels) and return an Sk4px (4 dst pixels).
76 Sk4px dst0 = fn(Load4(src+0)),
104 Sk4px dst0 = fn(Load4(dst+0), Load4(src+0)),
133 Sk4px alpha0 = Load4Alphas(a+0),
135 Sk4px dst0 = fn(Load4(dst+0), Load4(src+0), alpha0),
144 Sk4px alpha = Load4Alphas(a);
149 Sk4px alpha = Load2Alphas(a);
154 Sk4px alpha(*a);