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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 "ushr v18.8h, v5.8h, #6 \t\n" | 416 "ushr v18.8h, v5.8h, #6 \t\n" |
417 "ushr v21.8h, v17.8h, #5 \t\n" | 417 "ushr v21.8h, v17.8h, #5 \t\n" |
418 "addhn2 v7.16b, v5.8h, v18.8h \t\n" | 418 "addhn2 v7.16b, v5.8h, v18.8h \t\n" |
419 "addhn2 v20.16b, v17.8h, v21.8h \t\n" | 419 "addhn2 v20.16b, v17.8h, v21.8h \t\n" |
420 "mov v22.16b, v4.16b \t\n" | 420 "mov v22.16b, v4.16b \t\n" |
421 "addhn v6.8b, v6.8h, v19.8h \t\n" | 421 "addhn v6.8b, v6.8h, v19.8h \t\n" |
422 "umlal2 v22.8h, v3.16b, v16.16b \t\n" | 422 "umlal2 v22.8h, v3.16b, v16.16b \t\n" |
423 "ushr v5.8h, v22.8h, #5 \t\n" | 423 "ushr v5.8h, v22.8h, #5 \t\n" |
424 "addhn2 v6.16b, v22.8h, v5.8h \t\n" | 424 "addhn2 v6.16b, v22.8h, v5.8h \t\n" |
425 "uqadd v7.16b, v1.16b, v7.16b \t\n" | 425 "uqadd v7.16b, v1.16b, v7.16b \t\n" |
| 426 #if SK_PMCOLOR_BYTE_ORDER(B,G,R,A) |
426 "uqadd v20.16b, v2.16b, v20.16b \t\n" | 427 "uqadd v20.16b, v2.16b, v20.16b \t\n" |
427 "uqadd v6.16b, v0.16b, v6.16b \t\n" | 428 "uqadd v6.16b, v0.16b, v6.16b \t\n" |
| 429 #elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A) |
| 430 "uqadd v20.16b, v0.16b, v20.16b \t\n" |
| 431 "uqadd v6.16b, v2.16b, v6.16b \t\n" |
| 432 #else |
| 433 #error "This function only supports BGRA and RGBA." |
| 434 #endif |
428 "shll v22.8h, v20.8b, #8 \t\n" | 435 "shll v22.8h, v20.8b, #8 \t\n" |
429 "shll v5.8h, v7.8b, #8 \t\n" | 436 "shll v5.8h, v7.8b, #8 \t\n" |
430 "sri v22.8h, v5.8h, #5 \t\n" | 437 "sri v22.8h, v5.8h, #5 \t\n" |
431 "shll v17.8h, v6.8b, #8 \t\n" | 438 "shll v17.8h, v6.8b, #8 \t\n" |
432 "shll2 v23.8h, v20.16b, #8 \t\n" | 439 "shll2 v23.8h, v20.16b, #8 \t\n" |
433 "shll2 v7.8h, v7.16b, #8 \t\n" | 440 "shll2 v7.8h, v7.16b, #8 \t\n" |
434 "sri v22.8h, v17.8h, #11 \t\n" | 441 "sri v22.8h, v17.8h, #11 \t\n" |
435 "sri v23.8h, v7.8h, #5 \t\n" | 442 "sri v23.8h, v7.8h, #5 \t\n" |
436 "shll2 v6.8h, v6.16b, #8 \t\n" | 443 "shll2 v6.8h, v6.16b, #8 \t\n" |
437 "st1 {v22.8h}, [%[dst]], #16 \t\n" | 444 "st1 {v22.8h}, [%[dst]], #16 \t\n" |
(...skipping 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1636 count--; | 1643 count--; |
1637 } | 1644 } |
1638 } | 1645 } |
1639 | 1646 |
1640 /////////////////////////////////////////////////////////////////////////////// | 1647 /////////////////////////////////////////////////////////////////////////////// |
1641 | 1648 |
1642 const SkBlitRow::Proc sk_blitrow_platform_565_procs_arm_neon[] = { | 1649 const SkBlitRow::Proc sk_blitrow_platform_565_procs_arm_neon[] = { |
1643 // no dither | 1650 // no dither |
1644 S32_D565_Opaque_neon, | 1651 S32_D565_Opaque_neon, |
1645 S32_D565_Blend_neon, | 1652 S32_D565_Blend_neon, |
1646 #ifdef SK_CPU_ARM32 | |
1647 S32A_D565_Opaque_neon, | 1653 S32A_D565_Opaque_neon, |
1648 #else | |
1649 NULL, | |
1650 #endif | |
1651 S32A_D565_Blend_neon, | 1654 S32A_D565_Blend_neon, |
1652 | 1655 |
1653 // dither | 1656 // dither |
1654 S32_D565_Opaque_Dither_neon, | 1657 S32_D565_Opaque_Dither_neon, |
1655 S32_D565_Blend_Dither_neon, | 1658 S32_D565_Blend_Dither_neon, |
1656 S32A_D565_Opaque_Dither_neon, | 1659 S32A_D565_Opaque_Dither_neon, |
1657 NULL, // S32A_D565_Blend_Dither | 1660 NULL, // S32A_D565_Blend_Dither |
1658 }; | 1661 }; |
1659 | 1662 |
1660 const SkBlitRow::Proc32 sk_blitrow_platform_32_procs_arm_neon[] = { | 1663 const SkBlitRow::Proc32 sk_blitrow_platform_32_procs_arm_neon[] = { |
(...skipping 13 matching lines...) Expand all Loading... |
1674 S32A_Opaque_BlitRow32_neon_src_alpha, // S32A_Opaque, | 1677 S32A_Opaque_BlitRow32_neon_src_alpha, // S32A_Opaque, |
1675 #else | 1678 #else |
1676 S32A_Opaque_BlitRow32_neon, // S32A_Opaque, | 1679 S32A_Opaque_BlitRow32_neon, // S32A_Opaque, |
1677 #endif | 1680 #endif |
1678 #ifdef SK_CPU_ARM32 | 1681 #ifdef SK_CPU_ARM32 |
1679 S32A_Blend_BlitRow32_neon // S32A_Blend | 1682 S32A_Blend_BlitRow32_neon // S32A_Blend |
1680 #else | 1683 #else |
1681 NULL | 1684 NULL |
1682 #endif | 1685 #endif |
1683 }; | 1686 }; |
OLD | NEW |