Note that a deeper discussion of partial scanline subsets and image frame subsets is below. Currently, we do not support both simultaneously. If options->fSubset is non-NULL, frame must be NULL.
825 {
827 return nullptr;
828 }
829
830 RowProc fastProc = nullptr;
831 RowProc proc = nullptr;
835
836 switch (encodedInfo.
color()) {
839 case 1:
844 break;
847 break;
850 break;
853 break;
854 default:
855 return nullptr;
856 }
857 break;
858 case 8:
864 break;
868 break;
871 break;
872 default:
873 return nullptr;
874 }
875 break;
876 default:
877 return nullptr;
878 }
879 break;
885 if (premultiply) {
887 proc = &SkipLeadingGrayAlphaZerosThen
889 fastProc = &SkipLeadingGrayAlphaZerosThen
891 } else {
894 }
895 } else {
897 proc = &SkipLeadingGrayAlphaZerosThen
899 fastProc = &SkipLeadingGrayAlphaZerosThen
901 } else {
904 }
905 }
906 break;
909 break;
910 default:
911 return nullptr;
912 }
913 break;
915
916
918 case 1:
919 case 2:
920 case 4:
925 break;
928 break;
929 default:
930 return nullptr;
931 }
932 break;
933 case 8:
940 } else {
942 }
943 break;
946 break;
947 default:
948 return nullptr;
949 }
950 break;
951 default:
952 return nullptr;
953 }
954 break;
956
957
958
964 break;
965 }
966
970 break;
974 break;
975 }
976
980 break;
984 break;
985 }
986
988 break;
989 default:
990 return nullptr;
991 }
992 break;
999 break;
1000 }
1001
1003 if (premultiply) {
1005 proc = &SkipLeading8888ZerosThen<swizzle_rgba_to_rgba_premul>;
1006 fastProc = &SkipLeading8888ZerosThen
1008 } else {
1011 }
1012 } else {
1014 proc = &SkipLeading8888ZerosThen<sample4>;
1015 fastProc = &SkipLeading8888ZerosThen<copy>;
1016 } else {
1019 }
1020 }
1021 break;
1026 break;
1027 }
1028
1030 if (premultiply) {
1032 proc = &SkipLeading8888ZerosThen<swizzle_rgba_to_bgra_premul>;
1033 fastProc = &SkipLeading8888ZerosThen
1035 } else {
1038 }
1039 } else {
1041 proc = &SkipLeading8888ZerosThen<swizzle_rgba_to_bgra_unpremul>;
1042 fastProc = &SkipLeading8888ZerosThen
1044 } else {
1047 }
1048 }
1049 break;
1050 default:
1051 return nullptr;
1052 }
1053 break;
1059 break;
1063 break;
1066 break;
1067 default:
1068 return nullptr;
1069 }
1070 break;
1075 break;
1078 break;
1081 break;
1082 default:
1083 return nullptr;
1084 }
1085 break;
1089 if (premultiply) {
1091 proc = &SkipLeading8888ZerosThen<swizzle_rgba_to_rgba_premul>;
1092 fastProc = &SkipLeading8888ZerosThen
1094 } else {
1097 }
1098 } else {
1100 proc = &SkipLeading8888ZerosThen<sample4>;
1101 fastProc = &SkipLeading8888ZerosThen<copy>;
1102 } else {
1105 }
1106 }
1107 break;
1109 if (premultiply) {
1111 proc = &SkipLeading8888ZerosThen<swizzle_rgba_to_bgra_premul>;
1112 fastProc = &SkipLeading8888ZerosThen
1114 } else {
1117 }
1118 } else {
1120 proc = &SkipLeading8888ZerosThen<swizzle_rgba_to_bgra_unpremul>;
1121 fastProc = &SkipLeading8888ZerosThen
1123 } else {
1126 }
1127 }
1128 break;
1129 default:
1130 return nullptr;
1131 }
1132 break;
1138 break;
1142 break;
1145 break;
1146 default:
1147 return nullptr;
1148 }
1149 break;
1150 default:
1151 return nullptr;
1152 }
1153
1154
1156 int srcBPP =
SkIsAlign8(bitsPerPixel) ? bitsPerPixel / 8 : bitsPerPixel;
1158 return Make(dstInfo, fastProc, proc, ctable, srcBPP, dstBPP,
options,
frame);
1159}
static constexpr bool SkIsAlign8(T x)
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
@ kBGRA_8888_SkColorType
pixel with 8 bits for blue, green, red, alpha; in 32-bit word
@ kRGBA_F16_SkColorType
pixel with half floats for red, green, blue, alpha;
@ kAlpha_8_SkColorType
pixel with alpha in 8-bit byte
@ kGray_8_SkColorType
pixel with grayscale level in 8-bit byte
@ kRGB_565_SkColorType
pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word
@ kRGBA_8888_SkColorType
pixel with 8 bits for red, green, blue, alpha; in 32-bit word
@ kBGR_101010x_XR_SkColorType
pixel with 10 bits each for blue, green, red; in 32-bit word, extended range
static void swizzle_cmyk_to_bgra(void *SK_RESTRICT dstRow, const uint8_t *SK_RESTRICT src, int dstWidth, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void swizzle_bgr_to_565(void *SK_RESTRICT dstRow, const uint8_t *SK_RESTRICT src, int dstWidth, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void fast_swizzle_grayalpha_to_n32_premul(void *dst, const uint8_t *src, int width, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void swizzle_gray_to_565(void *SK_RESTRICT dstRow, const uint8_t *SK_RESTRICT src, int dstWidth, int bytesPerPixel, int deltaSrc, int offset, const SkPMColor ctable[])
static void fast_swizzle_cmyk_to_rgba(void *dst, const uint8_t *src, int width, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void swizzle_rgb_to_565(void *SK_RESTRICT dstRow, const uint8_t *SK_RESTRICT src, int dstWidth, int bytesPerPixel, int deltaSrc, int offset, const SkPMColor ctable[])
static void fast_swizzle_cmyk_to_bgra(void *dst, const uint8_t *src, int width, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void swizzle_rgba16_to_bgra_premul(void *dst, const uint8_t *src, int width, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void swizzle_rgb16_to_565(void *dst, const uint8_t *src, int width, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void swizzle_rgb_to_rgba(void *SK_RESTRICT dstRow, const uint8_t *SK_RESTRICT src, int dstWidth, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void swizzle_gray_to_n32(void *SK_RESTRICT dstRow, const uint8_t *SK_RESTRICT src, int dstWidth, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void fast_swizzle_rgb_to_rgba(void *dst, const uint8_t *src, int width, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void swizzle_rgba16_to_rgba_premul(void *dst, const uint8_t *src, int width, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void swizzle_rgba_to_bgra_unpremul(void *SK_RESTRICT dstRow, const uint8_t *SK_RESTRICT src, int dstWidth, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void swizzle_rgb16_to_bgra(void *dst, const uint8_t *src, int width, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void sample1(void *dst, const uint8_t *src, int width, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void swizzle_bit_to_n32(void *SK_RESTRICT dstRow, const uint8_t *SK_RESTRICT src, int dstWidth, int bpp, int deltaSrc, int offset, const SkPMColor *)
static void swizzle_rgba_to_rgba_premul(void *SK_RESTRICT dstRow, const uint8_t *SK_RESTRICT src, int dstWidth, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void swizzle_grayalpha_to_n32_premul(void *dst, const uint8_t *src, int width, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void fast_swizzle_rgba_to_rgba_premul(void *dst, const uint8_t *src, int width, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void swizzle_rgba16_to_rgba_unpremul(void *dst, const uint8_t *src, int width, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void swizzle_rgba16_to_bgra_unpremul(void *dst, const uint8_t *src, int width, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void swizzle_grayalpha_to_n32_unpremul(void *dst, const uint8_t *src, int width, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void swizzle_rgb16_to_rgba(void *dst, const uint8_t *src, int width, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void fast_swizzle_grayalpha_to_n32_unpremul(void *dst, const uint8_t *src, int width, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void fast_swizzle_gray_to_n32(void *dst, const uint8_t *src, int width, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void fast_swizzle_rgba_to_bgra_premul(void *dst, const uint8_t *src, int width, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void swizzle_small_index_to_565(void *SK_RESTRICT dstRow, const uint8_t *SK_RESTRICT src, int dstWidth, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void swizzle_cmyk_to_565(void *SK_RESTRICT dstRow, const uint8_t *SK_RESTRICT src, int dstWidth, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void swizzle_bit_to_f16(void *SK_RESTRICT dstRow, const uint8_t *SK_RESTRICT src, int dstWidth, int bpp, int deltaSrc, int offset, const SkPMColor *)
static void swizzle_cmyk_to_rgba(void *SK_RESTRICT dstRow, const uint8_t *SK_RESTRICT src, int dstWidth, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void swizzle_small_index_to_n32(void *SK_RESTRICT dstRow, const uint8_t *SK_RESTRICT src, int dstWidth, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void copy(void *dst, const uint8_t *src, int width, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void sample4(void *dst, const uint8_t *src, int width, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void fast_swizzle_rgb_to_bgra(void *dst, const uint8_t *src, int width, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void swizzle_index_to_n32(void *SK_RESTRICT dstRow, const uint8_t *SK_RESTRICT src, int dstWidth, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void swizzle_grayalpha_to_a8(void *dst, const uint8_t *src, int width, int bpp, int deltaSrc, int offset, const SkPMColor[])
static void swizzle_rgba_to_bgra_premul(void *SK_RESTRICT dstRow, const uint8_t *SK_RESTRICT src, int dstWidth, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void swizzle_rgb_to_bgra(void *SK_RESTRICT dstRow, const uint8_t *SK_RESTRICT src, int dstWidth, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void swizzle_index_to_n32_skipZ(void *SK_RESTRICT dstRow, const uint8_t *SK_RESTRICT src, int dstWidth, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void swizzle_bit_to_grayscale(void *SK_RESTRICT dstRow, const uint8_t *SK_RESTRICT src, int dstWidth, int bpp, int deltaSrc, int offset, const SkPMColor *)
static void swizzle_index_to_565(void *SK_RESTRICT dstRow, const uint8_t *SK_RESTRICT src, int dstWidth, int bytesPerPixel, int deltaSrc, int offset, const SkPMColor ctable[])
static void fast_swizzle_rgba_to_bgra_unpremul(void *dst, const uint8_t *src, int width, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
static void swizzle_bit_to_565(void *SK_RESTRICT dstRow, const uint8_t *SK_RESTRICT src, int dstWidth, int bpp, int deltaSrc, int offset, const SkPMColor *)
static std::unique_ptr< SkSwizzler > Make(const SkEncodedInfo &encodedInfo, const SkPMColor *ctable, const SkImageInfo &dstInfo, const SkCodec::Options &, const SkIRect *frame=nullptr)
uint8_t bitsPerPixel() const
uint8_t bitsPerComponent() const
int bytesPerPixel() const
SkAlphaType alphaType() const
SkColorType colorType() const