Chromium Code Reviews| Index: src/opts/SkNx_neon.h |
| diff --git a/src/opts/SkNx_neon.h b/src/opts/SkNx_neon.h |
| index a511243219e3157b5094584cabab51840a7415d3..a6c905d9ee7273eafa200351a49615dde8962fae 100644 |
| --- a/src/opts/SkNx_neon.h |
| +++ b/src/opts/SkNx_neon.h |
| @@ -523,7 +523,7 @@ static inline void Sk4h_load4(const void* ptr, Sk4h* r, Sk4h* g, Sk4h* b, Sk4h* |
| *a = rgba.val[3]; |
| } |
| -static inline void Sk4h_store4(void* dst, const Sk4h& r, const Sk4h& g, const Sk4h& b, |
| +static inline void Sk4f_store4(void* dst, const Sk4h& r, const Sk4h& g, const Sk4h& b, |
|
Brian Osman
2016/09/14 20:46:53
This looks like it should still be Sk4h_store4 ? A
msarett
2016/09/14 21:09:43
Yes :). Done.
|
| const Sk4h& a) { |
| uint16x4x4_t rgba = {{ |
| r.fVec, |
| @@ -534,4 +534,23 @@ static inline void Sk4h_store4(void* dst, const Sk4h& r, const Sk4h& g, const Sk |
| vst4_u16((uint16_t*) dst, rgba); |
| } |
| +static inline void Sk4f_load4(const void* ptr, Sk4f* r, Sk4f* g, Sk4f* b, Sk4f* a) { |
| + uint16x4x4_t rgba = vld4q_f32((const float*) ptr); |
|
Brian Osman
2016/09/14 20:46:53
float32x4x4_t ?
msarett
2016/09/14 21:09:43
Done.
|
| + *r = rgba.val[0]; |
| + *g = rgba.val[1]; |
| + *b = rgba.val[2]; |
| + *a = rgba.val[3]; |
| +} |
| + |
| +static inline void Sk4h_store4(void* dst, const Sk4f& r, const Sk4f& g, const Sk4f& b, |
| + const Sk4f& a) { |
| + float32x4x4_t rgba = {{ |
| + r.fVec, |
| + g.fVec, |
| + b.fVec, |
| + a.fVec, |
| + }}; |
| + vst4q_f32((float*) dst, rgba); |
| +} |
| + |
| #endif//SkNx_neon_DEFINED |