49 { srgb, adobe,
premul,
premul,
true,
true,
true,
true,
true },
52 { adobe, srgb, unpremul,
premul,
false,
true,
true,
true,
true },
53 { srgb, adobe, unpremul,
premul,
false,
true,
true,
true,
true },
56 { adobe, srgb, opaque,
premul,
false,
true,
true,
true,
false },
57 { srgb, adobe, opaque,
premul,
false,
true,
true,
true,
false },
69 { srgb22, srgb,
premul,
premul,
true,
true,
false,
true,
true },
72 { srgb, srgb22, unpremul,
premul,
false,
true,
false,
true,
true },
73 { srgb22, srgb, unpremul,
premul,
false,
true,
false,
true,
true },
74 { srgb, srgb22, opaque,
premul,
false,
true,
false,
true,
false },
75 { srgb22, srgb, opaque,
premul,
false,
true,
false,
true,
false },
79 { srgb, srgb,
premul,
premul,
false,
false,
false,
false,
false },
80 { srgb, srgb, unpremul,
premul,
false,
false,
false,
false,
true },
81 { srgb, srgb, opaque,
premul,
false,
false,
false,
false,
false },
84 { srgb1, adobe,
premul,
premul,
true,
false,
true,
true,
true },
85 { srgb1, srgb,
premul,
premul,
true,
false,
false,
true,
true },
87 { adobe, srgb1,
premul,
premul,
true,
true,
true,
false,
true },
88 { srgb, srgb1,
premul,
premul,
true,
true,
false,
false,
true },
91 { adobe1, srgb1,
premul,
premul,
false,
false,
true,
false,
false },
92 { adobe1, srgb1, opaque,
premul,
false,
false,
true,
false,
false },
93 { adobe1, srgb1, unpremul,
premul,
false,
false,
true,
false,
true },
97 { srgb, srgb1, opaque,
premul,
false,
true,
false,
false,
false },
98 { srgb, srgb1, unpremul,
premul,
false,
true,
false,
false,
true },
99 { srgb, adobe1, opaque,
premul,
false,
true,
true,
false,
false },
100 { srgb, adobe1, unpremul,
premul,
false,
true,
true,
false,
true },
101 { srgb1, srgb, opaque,
premul,
false,
false,
false,
true,
false },
102 { srgb1, srgb, unpremul,
premul,
false,
false,
false,
true,
true },
103 { srgb1, adobe, opaque,
premul,
false,
false,
true,
true,
false },
104 { srgb1, adobe, unpremul,
premul,
false,
false,
true,
true,
true },
107 { srgb , srgb ,
premul, unpremul,
true,
false,
false,
false,
false },
108 { srgb , srgb1 ,
premul, unpremul,
true,
true,
false,
false,
false },
109 { srgb1, adobe1,
premul, unpremul,
true,
false,
true,
false,
false },
110 { srgb , adobe1,
premul, unpremul,
true,
true,
true,
false,
false },
111 { srgb1, srgb ,
premul, unpremul,
true,
false,
false,
true,
false },
112 { srgb , srgb22,
premul, unpremul,
true,
true,
false,
true,
false },
113 { srgb1, adobe ,
premul, unpremul,
true,
false,
true,
true,
false },
114 { srgb , adobe ,
premul, unpremul,
true,
true,
true,
true,
false },
118 { srgb , srgb ,
premul, opaque,
false,
false,
false,
false,
false },
119 { srgb , srgb1 ,
premul, opaque,
true,
true,
false,
false,
true },
120 { srgb1, adobe1,
premul, opaque,
false,
false,
true,
false,
false },
121 { srgb , adobe1,
premul, opaque,
true,
true,
true,
false,
true },
122 { srgb1, srgb ,
premul, opaque,
true,
false,
false,
true,
true },
123 { srgb , srgb22,
premul, opaque,
true,
true,
false,
true,
true },
124 { srgb1, adobe ,
premul, opaque,
true,
false,
true,
true,
true },
125 { srgb , adobe ,
premul, opaque,
true,
true,
true,
true,
true },
127 { srgb , srgb , unpremul, opaque,
false,
false,
false,
false,
false },
128 { srgb , srgb1 , unpremul, opaque,
false,
true,
false,
false,
false },
129 { srgb1, adobe1, unpremul, opaque,
false,
false,
true,
false,
false },
130 { srgb , adobe1, unpremul, opaque,
false,
true,
true,
false,
false },
131 { srgb1, srgb , unpremul, opaque,
false,
false,
false,
true,
false },
132 { srgb , srgb22, unpremul, opaque,
false,
true,
false,
true,
false },
133 { srgb1, adobe , unpremul, opaque,
false,
false,
true,
true,
false },
134 { srgb , adobe , unpremul, opaque,
false,
true,
true,
true,
false },
137 uint32_t tested = 0x00000000;
140 t.dst.get(), t.dstAT};
147 uint32_t
bits = (uint32_t)t.unpremul << 0
148 | (uint32_t)t.linearize << 1
149 | (uint32_t)t.gamut_transform << 2
150 | (uint32_t)t.encode << 3
151 | (uint32_t)t.premul << 4;
156 for (uint32_t t = 0; t < 32; t++) {
157 if (tested & (1<<t)) {
165 if (t == 0b10001 || t == 0b10101) {
169 ERRORF(r,
"{ xxx, yyy, at, %s,%s,%s,%s,%s }, not covered",
170 (t& 1) ?
" true" :
"false",
171 (t& 2) ?
" true" :
"false",
172 (t& 4) ?
" true" :
"false",
173 (t& 8) ?
" true" :
"false",
174 (t&16) ?
" true" :
"false");
@ kOpaque_SkAlphaType
pixel is opaque
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
static void encode(uint8_t output[16], const uint32_t input[4])
#define REPORTER_ASSERT(r, cond,...)
static uint32_t premul(uint32_t color)
sk_sp< SkColorSpace > makeLinearGamma() const
static sk_sp< SkColorSpace > MakeSRGB()
static sk_sp< SkColorSpace > MakeRGB(const skcms_TransferFunction &transferFn, const skcms_Matrix3x3 &toXYZ)
static constexpr skcms_Matrix3x3 kSRGB
static constexpr skcms_Matrix3x3 kAdobeRGB
static constexpr skcms_TransferFunction k2Dot2