OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The Android Open Source Project | 2 * Copyright 2012 The Android Open Source Project |
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 #include "SkBlitRow_opts_arm_neon.h" | 8 #include "SkBlitRow_opts_arm_neon.h" |
9 | 9 |
10 #include "SkBlitMask.h" | 10 #include "SkBlitMask.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 SkASSERT(255 == alpha); | 24 SkASSERT(255 == alpha); |
25 | 25 |
26 while (count >= 8) { | 26 while (count >= 8) { |
27 uint8x8x4_t vsrc; | 27 uint8x8x4_t vsrc; |
28 uint16x8_t vdst; | 28 uint16x8_t vdst; |
29 | 29 |
30 // Load | 30 // Load |
31 vsrc = vld4_u8((uint8_t*)src); | 31 vsrc = vld4_u8((uint8_t*)src); |
32 | 32 |
33 // Convert src to 565 | 33 // Convert src to 565 |
34 vdst = vshll_n_u8(vsrc.val[NEON_R], 8); | 34 vdst = SkPixel32ToPixel16_neon8(vsrc); |
35 vdst = vsriq_n_u16(vdst, vshll_n_u8(vsrc.val[NEON_G], 8), 5); | |
36 vdst = vsriq_n_u16(vdst, vshll_n_u8(vsrc.val[NEON_B], 8), 5+6); | |
37 | 35 |
38 // Store | 36 // Store |
39 vst1q_u16(dst, vdst); | 37 vst1q_u16(dst, vdst); |
40 | 38 |
41 // Prepare next iteration | 39 // Prepare next iteration |
42 dst += 8; | 40 dst += 8; |
43 src += 8; | 41 src += 8; |
44 count -= 8; | 42 count -= 8; |
45 }; | 43 }; |
46 | 44 |
(...skipping 1389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1436 * case where we do not inspect the src alpha. | 1434 * case where we do not inspect the src alpha. |
1437 */ | 1435 */ |
1438 #if SK_A32_SHIFT == 24 | 1436 #if SK_A32_SHIFT == 24 |
1439 // This proc assumes the alpha value occupies bits 24-32 of each SkPMColor | 1437 // This proc assumes the alpha value occupies bits 24-32 of each SkPMColor |
1440 S32A_Opaque_BlitRow32_neon_src_alpha, // S32A_Opaque, | 1438 S32A_Opaque_BlitRow32_neon_src_alpha, // S32A_Opaque, |
1441 #else | 1439 #else |
1442 S32A_Opaque_BlitRow32_neon, // S32A_Opaque, | 1440 S32A_Opaque_BlitRow32_neon, // S32A_Opaque, |
1443 #endif | 1441 #endif |
1444 S32A_Blend_BlitRow32_neon // S32A_Blend | 1442 S32A_Blend_BlitRow32_neon // S32A_Blend |
1445 }; | 1443 }; |
OLD | NEW |