OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 #include "SkBitmapProcState.h" | 8 #include "SkBitmapProcState.h" |
9 #include "SkBitmapProcState_filter.h" | 9 #include "SkBitmapProcState_filter.h" |
10 #include "SkColorPriv.h" | 10 #include "SkColorPriv.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 S4444_alpha_D32_filter_DX_neon, | 59 S4444_alpha_D32_filter_DX_neon, |
60 | 60 |
61 // A8 treats alpha/opauqe the same (equally efficient) | 61 // A8 treats alpha/opauqe the same (equally efficient) |
62 SA8_alpha_D32_nofilter_DXDY_neon, | 62 SA8_alpha_D32_nofilter_DXDY_neon, |
63 SA8_alpha_D32_nofilter_DXDY_neon, | 63 SA8_alpha_D32_nofilter_DXDY_neon, |
64 SA8_alpha_D32_nofilter_DX_neon, | 64 SA8_alpha_D32_nofilter_DX_neon, |
65 SA8_alpha_D32_nofilter_DX_neon, | 65 SA8_alpha_D32_nofilter_DX_neon, |
66 SA8_alpha_D32_filter_DXDY_neon, | 66 SA8_alpha_D32_filter_DXDY_neon, |
67 SA8_alpha_D32_filter_DXDY_neon, | 67 SA8_alpha_D32_filter_DXDY_neon, |
68 SA8_alpha_D32_filter_DX_neon, | 68 SA8_alpha_D32_filter_DX_neon, |
69 SA8_alpha_D32_filter_DX_neon | 69 SA8_alpha_D32_filter_DX_neon, |
| 70 |
| 71 // todo: possibly specialize on opaqueness |
| 72 SG8_alpha_D32_nofilter_DXDY_neon, |
| 73 SG8_alpha_D32_nofilter_DXDY_neon, |
| 74 SG8_alpha_D32_nofilter_DX_neon, |
| 75 SG8_alpha_D32_nofilter_DX_neon, |
| 76 SG8_alpha_D32_filter_DXDY_neon, |
| 77 SG8_alpha_D32_filter_DXDY_neon, |
| 78 SG8_alpha_D32_filter_DX_neon, |
| 79 SG8_alpha_D32_filter_DX_neon, |
70 }; | 80 }; |
71 | 81 |
72 const SkBitmapProcState::SampleProc16 gSkBitmapProcStateSample16_neon[] = { | 82 const SkBitmapProcState::SampleProc16 gSkBitmapProcStateSample16_neon[] = { |
73 S32_D16_nofilter_DXDY_neon, | 83 S32_D16_nofilter_DXDY_neon, |
74 S32_D16_nofilter_DX_neon, | 84 S32_D16_nofilter_DX_neon, |
75 S32_D16_filter_DXDY_neon, | 85 S32_D16_filter_DXDY_neon, |
76 S32_D16_filter_DX_neon, | 86 S32_D16_filter_DX_neon, |
77 | 87 |
78 S16_D16_nofilter_DXDY_neon, | 88 S16_D16_nofilter_DXDY_neon, |
79 S16_D16_nofilter_DX_neon, | 89 S16_D16_nofilter_DX_neon, |
80 S16_D16_filter_DXDY_neon, | 90 S16_D16_filter_DXDY_neon, |
81 S16_D16_filter_DX_neon, | 91 S16_D16_filter_DX_neon, |
82 | 92 |
83 SI8_D16_nofilter_DXDY_neon, | 93 SI8_D16_nofilter_DXDY_neon, |
84 SI8_D16_nofilter_DX_neon, | 94 SI8_D16_nofilter_DX_neon, |
85 SI8_D16_filter_DXDY_neon, | 95 SI8_D16_filter_DXDY_neon, |
86 SI8_D16_filter_DX_neon, | 96 SI8_D16_filter_DX_neon, |
87 | 97 |
88 // Don't support 4444 -> 565 | 98 // Don't support 4444 -> 565 |
89 NULL, NULL, NULL, NULL, | 99 NULL, NULL, NULL, NULL, |
90 // Don't support A8 -> 565 | 100 // Don't support A8 -> 565 |
91 NULL, NULL, NULL, NULL | 101 NULL, NULL, NULL, NULL, |
| 102 // Don't support G8 -> 565 (but we could) |
| 103 NULL, NULL, NULL, NULL, |
92 }; | 104 }; |
93 | 105 |
94 /////////////////////////////////////////////////////////////////////////////// | 106 /////////////////////////////////////////////////////////////////////////////// |
95 | 107 |
96 #include <arm_neon.h> | 108 #include <arm_neon.h> |
97 #include "SkConvolver.h" | 109 #include "SkConvolver.h" |
98 | 110 |
99 // Convolves horizontally along a single row. The row data is given in | 111 // Convolves horizontally along a single row. The row data is given in |
100 // |srcData| and continues for the numValues() of the filter. | 112 // |srcData| and continues for the numValues() of the filter. |
101 void convolveHorizontally_neon(const unsigned char* srcData, | 113 void convolveHorizontally_neon(const unsigned char* srcData, |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 } | 514 } |
503 } | 515 } |
504 | 516 |
505 void platformConvolutionProcs_arm_neon(SkConvolutionProcs* procs) { | 517 void platformConvolutionProcs_arm_neon(SkConvolutionProcs* procs) { |
506 procs->fExtraHorizontalReads = 3; | 518 procs->fExtraHorizontalReads = 3; |
507 procs->fConvolveVertically = &convolveVertically_neon; | 519 procs->fConvolveVertically = &convolveVertically_neon; |
508 procs->fConvolve4RowsHorizontally = &convolve4RowsHorizontally_neon; | 520 procs->fConvolve4RowsHorizontally = &convolve4RowsHorizontally_neon; |
509 procs->fConvolveHorizontally = &convolveHorizontally_neon; | 521 procs->fConvolveHorizontally = &convolveHorizontally_neon; |
510 procs->fApplySIMDPadding = &applySIMDPadding_neon; | 522 procs->fApplySIMDPadding = &applySIMDPadding_neon; |
511 } | 523 } |
OLD | NEW |