OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
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 #include "SkCodecPriv.h" | 8 #include "SkCodecPriv.h" |
9 #include "SkColorPriv.h" | 9 #include "SkColorPriv.h" |
10 #include "SkOpts.h" | 10 #include "SkOpts.h" |
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 } | 705 } |
706 break; | 706 break; |
707 case 8: | 707 case 8: |
708 switch (dstInfo.colorType()) { | 708 switch (dstInfo.colorType()) { |
709 case kRGBA_8888_SkColorType: | 709 case kRGBA_8888_SkColorType: |
710 case kBGRA_8888_SkColorType: | 710 case kBGRA_8888_SkColorType: |
711 proc = &swizzle_gray_to_n32; | 711 proc = &swizzle_gray_to_n32; |
712 fastProc = &fast_swizzle_gray_to_n32; | 712 fastProc = &fast_swizzle_gray_to_n32; |
713 break; | 713 break; |
714 case kGray_8_SkColorType: | 714 case kGray_8_SkColorType: |
| 715 case kAlpha_8_SkColorType: |
715 proc = &sample1; | 716 proc = &sample1; |
716 fastProc = © | 717 fastProc = © |
717 break; | 718 break; |
718 case kRGB_565_SkColorType: | 719 case kRGB_565_SkColorType: |
719 proc = &swizzle_gray_to_565; | 720 proc = &swizzle_gray_to_565; |
720 break; | 721 break; |
721 default: | 722 default: |
722 return nullptr; | 723 return nullptr; |
723 } | 724 } |
724 break; | 725 break; |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1036 } | 1037 } |
1037 | 1038 |
1038 return fAllocatedWidth; | 1039 return fAllocatedWidth; |
1039 } | 1040 } |
1040 | 1041 |
1041 void SkSwizzler::swizzle(void* dst, const uint8_t* SK_RESTRICT src) { | 1042 void SkSwizzler::swizzle(void* dst, const uint8_t* SK_RESTRICT src) { |
1042 SkASSERT(nullptr != dst && nullptr != src); | 1043 SkASSERT(nullptr != dst && nullptr != src); |
1043 fActualProc(SkTAddOffset<void>(dst, fDstOffsetBytes), src, fSwizzleWidth, fS
rcBPP, | 1044 fActualProc(SkTAddOffset<void>(dst, fDstOffsetBytes), src, fSwizzleWidth, fS
rcBPP, |
1044 fSampleX * fSrcBPP, fSrcOffsetUnits, fColorTable); | 1045 fSampleX * fSrcBPP, fSrcOffsetUnits, fColorTable); |
1045 } | 1046 } |
OLD | NEW |