OLD | NEW |
1 #include "SkXfermode.h" | 1 #include "SkXfermode.h" |
2 #include "SkXfermode_proccoeff.h" | 2 #include "SkXfermode_proccoeff.h" |
3 #include "SkColorPriv.h" | 3 #include "SkColorPriv.h" |
4 | 4 |
5 #include <arm_neon.h> | 5 #include <arm_neon.h> |
6 #include "SkColor_opts_neon.h" | 6 #include "SkColor_opts_neon.h" |
7 #include "SkXfermode_opts_arm_neon.h" | 7 #include "SkXfermode_opts_arm_neon.h" |
8 | 8 |
9 #define SkAlphaMulAlpha(a, b) SkMulDiv255Round(a, b) | 9 #define SkAlphaMulAlpha(a, b) SkMulDiv255Round(a, b) |
10 | 10 |
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
736 | 736 |
737 return ret; | 737 return ret; |
738 } | 738 } |
739 | 739 |
740 //////////////////////////////////////////////////////////////////////////////// | 740 //////////////////////////////////////////////////////////////////////////////// |
741 | 741 |
742 typedef uint8x8x4_t (*SkXfermodeProcSIMD)(uint8x8x4_t src, uint8x8x4_t dst); | 742 typedef uint8x8x4_t (*SkXfermodeProcSIMD)(uint8x8x4_t src, uint8x8x4_t dst); |
743 | 743 |
744 extern SkXfermodeProcSIMD gNEONXfermodeProcs[]; | 744 extern SkXfermodeProcSIMD gNEONXfermodeProcs[]; |
745 | 745 |
746 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING | |
747 SkNEONProcCoeffXfermode::SkNEONProcCoeffXfermode(SkReadBuffer& buffer) : INHERIT
ED(buffer) { | |
748 fProcSIMD = reinterpret_cast<void*>(gNEONXfermodeProcs[this->getMode()]); | |
749 } | |
750 #endif | |
751 | |
752 void SkNEONProcCoeffXfermode::xfer32(SkPMColor* SK_RESTRICT dst, | 746 void SkNEONProcCoeffXfermode::xfer32(SkPMColor* SK_RESTRICT dst, |
753 const SkPMColor* SK_RESTRICT src, int count
, | 747 const SkPMColor* SK_RESTRICT src, int count
, |
754 const SkAlpha* SK_RESTRICT aa) const { | 748 const SkAlpha* SK_RESTRICT aa) const { |
755 SkASSERT(dst && src && count >= 0); | 749 SkASSERT(dst && src && count >= 0); |
756 | 750 |
757 SkXfermodeProc proc = this->getProc(); | 751 SkXfermodeProc proc = this->getProc(); |
758 SkXfermodeProcSIMD procSIMD = reinterpret_cast<SkXfermodeProcSIMD>(fProcSIMD
); | 752 SkXfermodeProcSIMD procSIMD = reinterpret_cast<SkXfermodeProcSIMD>(fProcSIMD
); |
759 SkASSERT(procSIMD != NULL); | 753 SkASSERT(procSIMD != NULL); |
760 | 754 |
761 if (NULL == aa) { | 755 if (NULL == aa) { |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1020 | 1014 |
1021 if (procSIMD != NULL) { | 1015 if (procSIMD != NULL) { |
1022 return SkNEW_ARGS(SkNEONProcCoeffXfermode, (rec, mode, procSIMD)); | 1016 return SkNEW_ARGS(SkNEONProcCoeffXfermode, (rec, mode, procSIMD)); |
1023 } | 1017 } |
1024 return NULL; | 1018 return NULL; |
1025 } | 1019 } |
1026 | 1020 |
1027 SkXfermodeProc SkPlatformXfermodeProcFactory_impl_neon(SkXfermode::Mode mode) { | 1021 SkXfermodeProc SkPlatformXfermodeProcFactory_impl_neon(SkXfermode::Mode mode) { |
1028 return gNEONXfermodeProcs1[mode]; | 1022 return gNEONXfermodeProcs1[mode]; |
1029 } | 1023 } |
OLD | NEW |