OLD | NEW |
1 /* NEON optimized code (C) COPYRIGHT 2009 Motorola | 1 /* NEON optimized code (C) COPYRIGHT 2009 Motorola |
2 * | 2 * |
3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 #include "SkBitmapProcState.h" | 7 #include "SkBitmapProcState.h" |
8 #include "SkPerspIter.h" | 8 #include "SkPerspIter.h" |
9 #include "SkShader.h" | 9 #include "SkShader.h" |
10 #include "SkUtils.h" | 10 #include "SkUtils.h" |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 } | 465 } |
466 } | 466 } |
467 | 467 |
468 /////////////////////////////////////////////////////////////////////////////// | 468 /////////////////////////////////////////////////////////////////////////////// |
469 | 469 |
470 SkBitmapProcState::MatrixProc | 470 SkBitmapProcState::MatrixProc |
471 SkBitmapProcState::chooseMatrixProc(bool trivial_matrix) { | 471 SkBitmapProcState::chooseMatrixProc(bool trivial_matrix) { |
472 // test_int_tileprocs(); | 472 // test_int_tileprocs(); |
473 // check for our special case when there is no scale/affine/perspective | 473 // check for our special case when there is no scale/affine/perspective |
474 if (trivial_matrix) { | 474 if (trivial_matrix) { |
475 SkASSERT(kNone_BitmapFilter == fFilterQuality); | 475 SkASSERT(SkPaint::kNone_FilterLevel == fFilterLevel); |
476 fIntTileProcY = choose_int_tile_proc(fTileModeY); | 476 fIntTileProcY = choose_int_tile_proc(fTileModeY); |
477 switch (fTileModeX) { | 477 switch (fTileModeX) { |
478 case SkShader::kClamp_TileMode: | 478 case SkShader::kClamp_TileMode: |
479 return clampx_nofilter_trans; | 479 return clampx_nofilter_trans; |
480 case SkShader::kRepeat_TileMode: | 480 case SkShader::kRepeat_TileMode: |
481 return repeatx_nofilter_trans; | 481 return repeatx_nofilter_trans; |
482 case SkShader::kMirror_TileMode: | 482 case SkShader::kMirror_TileMode: |
483 return mirrorx_nofilter_trans; | 483 return mirrorx_nofilter_trans; |
484 } | 484 } |
485 } | 485 } |
486 | 486 |
487 int index = 0; | 487 int index = 0; |
488 if (fFilterQuality != kNone_BitmapFilter) { | 488 if (fFilterLevel != SkPaint::kNone_FilterLevel) { |
489 index = 1; | 489 index = 1; |
490 } | 490 } |
491 if (fInvType & SkMatrix::kPerspective_Mask) { | 491 if (fInvType & SkMatrix::kPerspective_Mask) { |
492 index += 4; | 492 index += 4; |
493 } else if (fInvType & SkMatrix::kAffine_Mask) { | 493 } else if (fInvType & SkMatrix::kAffine_Mask) { |
494 index += 2; | 494 index += 2; |
495 } | 495 } |
496 | 496 |
497 if (SkShader::kClamp_TileMode == fTileModeX && | 497 if (SkShader::kClamp_TileMode == fTileModeX && |
498 SkShader::kClamp_TileMode == fTileModeY) | 498 SkShader::kClamp_TileMode == fTileModeY) |
(...skipping 13 matching lines...) Expand all Loading... |
512 { | 512 { |
513 return SK_ARM_NEON_WRAP(RepeatX_RepeatY_Procs)[index]; | 513 return SK_ARM_NEON_WRAP(RepeatX_RepeatY_Procs)[index]; |
514 } | 514 } |
515 | 515 |
516 fTileProcX = choose_tile_proc(fTileModeX); | 516 fTileProcX = choose_tile_proc(fTileModeX); |
517 fTileProcY = choose_tile_proc(fTileModeY); | 517 fTileProcY = choose_tile_proc(fTileModeY); |
518 fTileLowBitsProcX = choose_tile_lowbits_proc(fTileModeX); | 518 fTileLowBitsProcX = choose_tile_lowbits_proc(fTileModeX); |
519 fTileLowBitsProcY = choose_tile_lowbits_proc(fTileModeY); | 519 fTileLowBitsProcY = choose_tile_lowbits_proc(fTileModeY); |
520 return GeneralXY_Procs[index]; | 520 return GeneralXY_Procs[index]; |
521 } | 521 } |
OLD | NEW |