OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 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 "SkColorPriv.h" | 9 #include "SkColorPriv.h" |
10 #include "SkFilterProc.h" | 10 #include "SkFilterProc.h" |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 fShaderProc16 = SK_ARM_NEON_WRAP(Repeat_S16_D16_filter_DX_shaderproc
); | 295 fShaderProc16 = SK_ARM_NEON_WRAP(Repeat_S16_D16_filter_DX_shaderproc
); |
296 } | 296 } |
297 } else if (SK_ARM_NEON_WRAP(SI8_opaque_D32_filter_DX) == fSampleProc32 && cl
amp_clamp) { | 297 } else if (SK_ARM_NEON_WRAP(SI8_opaque_D32_filter_DX) == fSampleProc32 && cl
amp_clamp) { |
298 fShaderProc32 = SK_ARM_NEON_WRAP(Clamp_SI8_opaque_D32_filter_DX_shaderpr
oc); | 298 fShaderProc32 = SK_ARM_NEON_WRAP(Clamp_SI8_opaque_D32_filter_DX_shaderpr
oc); |
299 } | 299 } |
300 | 300 |
301 if (NULL == fShaderProc32) { | 301 if (NULL == fShaderProc32) { |
302 fShaderProc32 = this->chooseShaderProc32(); | 302 fShaderProc32 = this->chooseShaderProc32(); |
303 } | 303 } |
304 | 304 |
| 305 if (NULL == fShaderProc32) { |
| 306 fShaderProc32 = this->chooseBitmapFilterProc(paint); |
| 307 } |
| 308 |
305 // see if our platform has any accelerated overrides | 309 // see if our platform has any accelerated overrides |
306 this->platformProcs(); | 310 this->platformProcs(); |
307 | 311 |
308 if (NULL == fShaderProc32) { | |
309 fShaderProc32 = this->chooseBicubicFilterProc(paint); | |
310 } | |
311 | |
312 return true; | 312 return true; |
313 } | 313 } |
314 | 314 |
315 static void Clamp_S32_D32_nofilter_trans_shaderproc(const SkBitmapProcState& s, | 315 static void Clamp_S32_D32_nofilter_trans_shaderproc(const SkBitmapProcState& s, |
316 int x, int y, | 316 int x, int y, |
317 SkPMColor* SK_RESTRICT color
s, | 317 SkPMColor* SK_RESTRICT color
s, |
318 int count) { | 318 int count) { |
319 SkASSERT(((s.fInvType & ~SkMatrix::kTranslate_Mask)) == 0); | 319 SkASSERT(((s.fInvType & ~SkMatrix::kTranslate_Mask)) == 0); |
320 SkASSERT(s.fInvKy == 0); | 320 SkASSERT(s.fInvKy == 0); |
321 SkASSERT(count > 0 && colors != NULL); | 321 SkASSERT(count > 0 && colors != NULL); |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
720 } else { | 720 } else { |
721 size >>= 2; | 721 size >>= 2; |
722 } | 722 } |
723 | 723 |
724 if (fDoFilter) { | 724 if (fDoFilter) { |
725 size >>= 1; | 725 size >>= 1; |
726 } | 726 } |
727 | 727 |
728 return size; | 728 return size; |
729 } | 729 } |
OLD | NEW |