| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 namespace { // See Sk4px.h | 8 namespace { // See Sk4px.h |
| 9 | 9 |
| 10 inline Sk4px::Sk4px(SkPMColor px) : INHERITED((uint8x16_t)vdupq_n_u32(px)) {} | 10 inline Sk4px Sk4px::DupPMColor(SkPMColor px) { return Sk16b((uint8x16_t)vdupq_n_
u32(px)); } |
| 11 | 11 |
| 12 inline Sk4px Sk4px::Load4(const SkPMColor px[4]) { | 12 inline Sk4px Sk4px::Load4(const SkPMColor px[4]) { |
| 13 return Sk16b((uint8x16_t)vld1q_u32(px)); | 13 return Sk16b((uint8x16_t)vld1q_u32(px)); |
| 14 } | 14 } |
| 15 inline Sk4px Sk4px::Load2(const SkPMColor px[2]) { | 15 inline Sk4px Sk4px::Load2(const SkPMColor px[2]) { |
| 16 uint32x2_t px2 = vld1_u32(px); | 16 uint32x2_t px2 = vld1_u32(px); |
| 17 return Sk16b((uint8x16_t)vcombine_u32(px2, px2)); | 17 return Sk16b((uint8x16_t)vcombine_u32(px2, px2)); |
| 18 } | 18 } |
| 19 inline Sk4px Sk4px::Load1(const SkPMColor px[1]) { | 19 inline Sk4px Sk4px::Load1(const SkPMColor px[1]) { |
| 20 return Sk16b((uint8x16_t)vdupq_n_u32(*px)); | 20 return Sk16b((uint8x16_t)vdupq_n_u32(*px)); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 return Sk16b(vandq_u8(this->fVec, (uint8x16_t)vdupq_n_u32(0xFF << SK_A32_SHI
FT))); | 85 return Sk16b(vandq_u8(this->fVec, (uint8x16_t)vdupq_n_u32(0xFF << SK_A32_SHI
FT))); |
| 86 } | 86 } |
| 87 | 87 |
| 88 inline Sk4px Sk4px::zeroAlphas() const { | 88 inline Sk4px Sk4px::zeroAlphas() const { |
| 89 // vbic(a,b) == a & ~b | 89 // vbic(a,b) == a & ~b |
| 90 return Sk16b(vbicq_u8(this->fVec, (uint8x16_t)vdupq_n_u32(0xFF << SK_A32_SHI
FT))); | 90 return Sk16b(vbicq_u8(this->fVec, (uint8x16_t)vdupq_n_u32(0xFF << SK_A32_SHI
FT))); |
| 91 } | 91 } |
| 92 | 92 |
| 93 } // namespace | 93 } // namespace |
| 94 | 94 |
| OLD | NEW |