OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2007 The Android Open Source Project | 2 * Copyright 2007 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 "SkScaledBitmapSampler.h" | 9 #include "SkScaledBitmapSampler.h" |
10 #include "SkBitmap.h" | 10 #include "SkBitmap.h" |
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 index += 3; | 689 index += 3; |
690 break; | 690 break; |
691 case SkScaledBitmapSampler::kRGB_565: | 691 case SkScaledBitmapSampler::kRGB_565: |
692 fSrcPixelSize = 2; | 692 fSrcPixelSize = 2; |
693 index += 4; | 693 index += 4; |
694 break; | 694 break; |
695 default: | 695 default: |
696 return false; | 696 return false; |
697 } | 697 } |
698 | 698 |
699 switch (dst->config()) { | 699 switch (dst->colorType()) { |
700 case SkBitmap::kARGB_8888_Config: | 700 case kN32_SkColorType: |
701 index += 0 * gProcDstConfigSpan; | 701 index += 0 * gProcDstConfigSpan; |
702 break; | 702 break; |
703 case SkBitmap::kRGB_565_Config: | 703 case kRGB_565_SkColorType: |
704 index += 1 * gProcDstConfigSpan; | 704 index += 1 * gProcDstConfigSpan; |
705 break; | 705 break; |
706 case SkBitmap::kARGB_4444_Config: | 706 case kARGB_4444_SkColorType: |
707 index += 2 * gProcDstConfigSpan; | 707 index += 2 * gProcDstConfigSpan; |
708 break; | 708 break; |
709 case SkBitmap::kIndex8_Config: | 709 case kIndex_8_SkColorType: |
710 index += 3 * gProcDstConfigSpan; | 710 index += 3 * gProcDstConfigSpan; |
711 break; | 711 break; |
712 case SkBitmap::kA8_Config: | 712 case kAlpha_8_SkColorType: |
713 index += 4 * gProcDstConfigSpan; | 713 index += 4 * gProcDstConfigSpan; |
714 break; | 714 break; |
715 default: | 715 default: |
716 return false; | 716 return false; |
717 } | 717 } |
718 | 718 |
719 RowProcChooser chooser = gProcChoosers[index]; | 719 RowProcChooser chooser = gProcChoosers[index]; |
720 if (NULL == chooser) { | 720 if (NULL == chooser) { |
721 fRowProc = NULL; | 721 fRowProc = NULL; |
722 } else { | 722 } else { |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
867 SkScaledBitmapSampler::RowProc actual = RowProcTester::getRo
wProc(sampler); | 867 SkScaledBitmapSampler::RowProc actual = RowProcTester::getRo
wProc(sampler); |
868 SkASSERT(expected == actual); | 868 SkASSERT(expected == actual); |
869 procCounter++; | 869 procCounter++; |
870 } | 870 } |
871 } | 871 } |
872 } | 872 } |
873 } | 873 } |
874 SkASSERT(SK_ARRAY_COUNT(gTestProcs) == procCounter); | 874 SkASSERT(SK_ARRAY_COUNT(gTestProcs) == procCounter); |
875 } | 875 } |
876 #endif // SK_DEBUG | 876 #endif // SK_DEBUG |
OLD | NEW |