OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2009 The Android Open Source Project | 2 * Copyright 2009 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 | 8 |
9 #include "SkBitmapProcState.h" | 9 #include "SkBitmapProcState.h" |
10 #include "SkColorPriv.h" | 10 #include "SkColorPriv.h" |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 */ | 195 */ |
196 void SkBitmapProcState::platformProcs() { | 196 void SkBitmapProcState::platformProcs() { |
197 #if !defined(SK_CPU_ARM64) && SK_ARM_ARCH >= 6 && !defined(SK_CPU_BENDIAN) | 197 #if !defined(SK_CPU_ARM64) && SK_ARM_ARCH >= 6 && !defined(SK_CPU_BENDIAN) |
198 bool isOpaque = 256 == fAlphaScale; | 198 bool isOpaque = 256 == fAlphaScale; |
199 bool justDx = false; | 199 bool justDx = false; |
200 | 200 |
201 if (fInvType <= (SkMatrix::kTranslate_Mask | SkMatrix::kScale_Mask)) { | 201 if (fInvType <= (SkMatrix::kTranslate_Mask | SkMatrix::kScale_Mask)) { |
202 justDx = true; | 202 justDx = true; |
203 } | 203 } |
204 | 204 |
205 switch (fBitmap->config()) { | 205 switch (fBitmap->colorType()) { |
206 case SkBitmap::kIndex8_Config: | 206 case kIndex_8_SkColorType: |
207 if (justDx && SkPaint::kNone_FilterLevel == fFilterLevel) { | 207 if (justDx && SkPaint::kNone_FilterLevel == fFilterLevel) { |
208 #if 0 /* crashing on android device */ | 208 #if 0 /* crashing on android device */ |
209 fSampleProc16 = SI8_D16_nofilter_DX_arm; | 209 fSampleProc16 = SI8_D16_nofilter_DX_arm; |
210 fShaderProc16 = NULL; | 210 fShaderProc16 = NULL; |
211 #endif | 211 #endif |
212 if (isOpaque) { | 212 if (isOpaque) { |
213 // this one is only very slighty faster than the C version | 213 // this one is only very slighty faster than the C version |
214 fSampleProc32 = SI8_opaque_D32_nofilter_DX_arm; | 214 fSampleProc32 = SI8_opaque_D32_nofilter_DX_arm; |
215 fShaderProc32 = NULL; | 215 fShaderProc32 = NULL; |
216 } | 216 } |
217 } | 217 } |
218 break; | 218 break; |
219 default: | 219 default: |
220 break; | 220 break; |
221 } | 221 } |
222 #endif | 222 #endif |
223 } | 223 } |
224 | 224 |
225 /////////////////////////////////////////////////////////////////////////////// | 225 /////////////////////////////////////////////////////////////////////////////// |
226 | 226 |
227 extern void platformConvolutionProcs_arm_neon(SkConvolutionProcs* procs); | 227 extern void platformConvolutionProcs_arm_neon(SkConvolutionProcs* procs); |
228 | 228 |
229 void platformConvolutionProcs_arm(SkConvolutionProcs* procs) { | 229 void platformConvolutionProcs_arm(SkConvolutionProcs* procs) { |
230 } | 230 } |
231 | 231 |
232 void SkBitmapProcState::platformConvolutionProcs(SkConvolutionProcs* procs) { | 232 void SkBitmapProcState::platformConvolutionProcs(SkConvolutionProcs* procs) { |
233 SK_ARM_NEON_WRAP(platformConvolutionProcs_arm)(procs); | 233 SK_ARM_NEON_WRAP(platformConvolutionProcs_arm)(procs); |
234 } | 234 } |
OLD | NEW |