Chromium Code Reviews| 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 #ifndef SkNx_neon_DEFINED | 8 #ifndef SkNx_neon_DEFINED |
| 9 #define SkNx_neon_DEFINED | 9 #define SkNx_neon_DEFINED |
| 10 | 10 |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 516 } | 516 } |
| 517 | 517 |
| 518 static inline void Sk4h_load4(const void* ptr, Sk4h* r, Sk4h* g, Sk4h* b, Sk4h* a) { | 518 static inline void Sk4h_load4(const void* ptr, Sk4h* r, Sk4h* g, Sk4h* b, Sk4h* a) { |
| 519 uint16x4x4_t rgba = vld4_u16((const uint16_t*)ptr); | 519 uint16x4x4_t rgba = vld4_u16((const uint16_t*)ptr); |
| 520 *r = rgba.val[0]; | 520 *r = rgba.val[0]; |
| 521 *g = rgba.val[1]; | 521 *g = rgba.val[1]; |
| 522 *b = rgba.val[2]; | 522 *b = rgba.val[2]; |
| 523 *a = rgba.val[3]; | 523 *a = rgba.val[3]; |
| 524 } | 524 } |
| 525 | 525 |
| 526 static inline void Sk4h_store4(void* dst, const Sk4h& r, const Sk4h& g, const Sk 4h& b, | 526 static inline void Sk4f_store4(void* dst, const Sk4h& r, const Sk4h& g, const Sk 4h& 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.
| |
| 527 const Sk4h& a) { | 527 const Sk4h& a) { |
| 528 uint16x4x4_t rgba = {{ | 528 uint16x4x4_t rgba = {{ |
| 529 r.fVec, | 529 r.fVec, |
| 530 g.fVec, | 530 g.fVec, |
| 531 b.fVec, | 531 b.fVec, |
| 532 a.fVec, | 532 a.fVec, |
| 533 }}; | 533 }}; |
| 534 vst4_u16((uint16_t*) dst, rgba); | 534 vst4_u16((uint16_t*) dst, rgba); |
| 535 } | 535 } |
| 536 | 536 |
| 537 static inline void Sk4f_load4(const void* ptr, Sk4f* r, Sk4f* g, Sk4f* b, Sk4f* a) { | |
| 538 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.
| |
| 539 *r = rgba.val[0]; | |
| 540 *g = rgba.val[1]; | |
| 541 *b = rgba.val[2]; | |
| 542 *a = rgba.val[3]; | |
| 543 } | |
| 544 | |
| 545 static inline void Sk4h_store4(void* dst, const Sk4f& r, const Sk4f& g, const Sk 4f& b, | |
| 546 const Sk4f& a) { | |
| 547 float32x4x4_t rgba = {{ | |
| 548 r.fVec, | |
| 549 g.fVec, | |
| 550 b.fVec, | |
| 551 a.fVec, | |
| 552 }}; | |
| 553 vst4q_f32((float*) dst, rgba); | |
| 554 } | |
| 555 | |
| 537 #endif//SkNx_neon_DEFINED | 556 #endif//SkNx_neon_DEFINED |
| OLD | NEW |