| Index: src/opts/Sk4px_SSE2.h
|
| diff --git a/src/opts/Sk4px_SSE2.h b/src/opts/Sk4px_SSE2.h
|
| index 55e1a69135d561a42d51f5dd2e456d7c1d05564c..9ba510347ec89808f972cd3a97e78406bea478ff 100644
|
| --- a/src/opts/Sk4px_SSE2.h
|
| +++ b/src/opts/Sk4px_SSE2.h
|
| @@ -76,3 +76,12 @@ inline Sk4px Sk4px::Load2Alphas(const SkAlpha a[2]) {
|
| uint32_t as = *(const uint16_t*)a; // Aa -> Aa00
|
| return Load4Alphas((const SkAlpha*)&as);
|
| }
|
| +
|
| +inline Sk4px Sk4px::zeroColors() const {
|
| + return Sk16b(_mm_and_si128(_mm_set1_epi32(0xFF << SK_A32_SHIFT), this->fVec));
|
| +}
|
| +
|
| +inline Sk4px Sk4px::zeroAlphas() const {
|
| + // andnot(a,b) == ~a & b
|
| + return Sk16b(_mm_andnot_si128(_mm_set1_epi32(0xFF << SK_A32_SHIFT), this->fVec));
|
| +}
|
|
|