| 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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 SkShader::kRepeat_TileMode == fTileModeY) { | 294 SkShader::kRepeat_TileMode == fTileModeY) { |
| 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 // see if our platform has any accelerated overrides | 305 // see if our platform has any accelerated overrides |
| 306 this->platformProcs(); | 306 this->platformProcs(); |
| 307 |
| 308 if (NULL == fShaderProc32) { |
| 309 fShaderProc32 = this->chooseBicubicFilterProc(paint); |
| 310 } |
| 311 |
| 307 return true; | 312 return true; |
| 308 } | 313 } |
| 309 | 314 |
| 310 static void Clamp_S32_D32_nofilter_trans_shaderproc(const SkBitmapProcState& s, | 315 static void Clamp_S32_D32_nofilter_trans_shaderproc(const SkBitmapProcState& s, |
| 311 int x, int y, | 316 int x, int y, |
| 312 SkPMColor* SK_RESTRICT color
s, | 317 SkPMColor* SK_RESTRICT color
s, |
| 313 int count) { | 318 int count) { |
| 314 SkASSERT(((s.fInvType & ~SkMatrix::kTranslate_Mask)) == 0); | 319 SkASSERT(((s.fInvType & ~SkMatrix::kTranslate_Mask)) == 0); |
| 315 SkASSERT(s.fInvKy == 0); | 320 SkASSERT(s.fInvKy == 0); |
| 316 SkASSERT(count > 0 && colors != NULL); | 321 SkASSERT(count > 0 && colors != NULL); |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 } else { | 720 } else { |
| 716 size >>= 2; | 721 size >>= 2; |
| 717 } | 722 } |
| 718 | 723 |
| 719 if (fDoFilter) { | 724 if (fDoFilter) { |
| 720 size >>= 1; | 725 size >>= 1; |
| 721 } | 726 } |
| 722 | 727 |
| 723 return size; | 728 return size; |
| 724 } | 729 } |
| OLD | NEW |