OLD | NEW |
| 1 // Copyright 2013 unknown |
| 2 |
1 #include "SkXfermode.h" | 3 #include "SkXfermode.h" |
2 #include "SkXfermode_proccoeff.h" | 4 #include "SkXfermode_proccoeff.h" |
3 #include "SkColorPriv.h" | 5 #include "SkColorPriv.h" |
4 | 6 |
5 #include <arm_neon.h> | 7 #include <arm_neon.h> |
6 #include "SkColor_opts_neon.h" | 8 #include "SkColor_opts_neon.h" |
7 #include "SkXfermode_opts_arm_neon.h" | 9 #include "SkXfermode_opts_arm_neon.h" |
| 10 #include "Sk4pxXfermode.h" |
8 | 11 |
9 #define SkAlphaMulAlpha(a, b) SkMulDiv255Round(a, b) | 12 #define SkAlphaMulAlpha(a, b) SkMulDiv255Round(a, b) |
10 | 13 |
11 | 14 |
12 //////////////////////////////////////////////////////////////////////////////// | 15 //////////////////////////////////////////////////////////////////////////////// |
13 // NEONized skia functions | 16 // NEONized skia functions |
14 //////////////////////////////////////////////////////////////////////////////// | 17 //////////////////////////////////////////////////////////////////////////////// |
15 | 18 |
16 static inline uint8x8_t SkAlphaMulAlpha_neon8(uint8x8_t color, uint8x8_t alpha)
{ | 19 static inline uint8x8_t SkAlphaMulAlpha_neon8(uint8x8_t color, uint8x8_t alpha)
{ |
17 uint16x8_t tmp; | 20 uint16x8_t tmp; |
(...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1003 NULL, // kLuminosity_Mode | 1006 NULL, // kLuminosity_Mode |
1004 }; | 1007 }; |
1005 | 1008 |
1006 SK_COMPILE_ASSERT( | 1009 SK_COMPILE_ASSERT( |
1007 SK_ARRAY_COUNT(gNEONXfermodeProcs1) == SkXfermode::kLastMode + 1, | 1010 SK_ARRAY_COUNT(gNEONXfermodeProcs1) == SkXfermode::kLastMode + 1, |
1008 mode1_count_arm | 1011 mode1_count_arm |
1009 ); | 1012 ); |
1010 | 1013 |
1011 SkProcCoeffXfermode* SkPlatformXfermodeFactory_impl_neon(const ProcCoeff& rec, | 1014 SkProcCoeffXfermode* SkPlatformXfermodeFactory_impl_neon(const ProcCoeff& rec, |
1012 SkXfermode::Mode mode)
{ | 1015 SkXfermode::Mode mode)
{ |
1013 | 1016 if (auto xfermode = SkCreate4pxXfermode(rec, mode)) { |
1014 void* procSIMD = reinterpret_cast<void*>(gNEONXfermodeProcs[mode]); | 1017 return xfermode; |
1015 | 1018 } |
1016 if (procSIMD != NULL) { | 1019 if (auto proc = gNEONXfermodeProcs[mode]) { |
1017 return SkNEW_ARGS(SkNEONProcCoeffXfermode, (rec, mode, procSIMD)); | 1020 return SkNEW_ARGS(SkNEONProcCoeffXfermode, (rec, mode, (void*)proc)); |
1018 } | 1021 } |
1019 return NULL; | 1022 return NULL; |
1020 } | 1023 } |
1021 | 1024 |
1022 SkXfermodeProc SkPlatformXfermodeProcFactory_impl_neon(SkXfermode::Mode mode) { | 1025 SkXfermodeProc SkPlatformXfermodeProcFactory_impl_neon(SkXfermode::Mode mode) { |
1023 return gNEONXfermodeProcs1[mode]; | 1026 return gNEONXfermodeProcs1[mode]; |
1024 } | 1027 } |
OLD | NEW |