OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 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 #ifndef SkColorXform_opts_DEFINED | 8 #ifndef SkColorXform_opts_DEFINED |
9 #define SkColorXform_opts_DEFINED | 9 #define SkColorXform_opts_DEFINED |
10 | 10 |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 *((uint64_t*) dst) = rgba; | 180 *((uint64_t*) dst) = rgba; |
181 dst = SkTAddOffset<void>(dst, sizeof(uint64_t)); | 181 dst = SkTAddOffset<void>(dst, sizeof(uint64_t)); |
182 } | 182 } |
183 | 183 |
184 src += 1; | 184 src += 1; |
185 len -= 1; | 185 len -= 1; |
186 } | 186 } |
187 } | 187 } |
188 | 188 |
189 static void color_xform_RGB1_to_2dot2(uint32_t* dst, const uint32_t* src, int le
n, | 189 static void color_xform_RGB1_to_2dot2(uint32_t* dst, const uint32_t* src, int le
n, |
190 const float* const srcTables[3], const flo
at matrix[12]) { | 190 const float* const srcTables[3], const flo
at matrix[16]) { |
191 color_xform_RGB1<k2Dot2_DstGamma>(dst, src, len, srcTables, matrix, nullptr)
; | 191 color_xform_RGB1<k2Dot2_DstGamma>(dst, src, len, srcTables, matrix, nullptr)
; |
192 } | 192 } |
193 | 193 |
194 static void color_xform_RGB1_to_srgb(uint32_t* dst, const uint32_t* src, int len
, | 194 static void color_xform_RGB1_to_srgb(uint32_t* dst, const uint32_t* src, int len
, |
195 const float* const srcTables[3], const floa
t matrix[12]) { | 195 const float* const srcTables[3], const floa
t matrix[16]) { |
196 color_xform_RGB1<kSRGB_DstGamma>(dst, src, len, srcTables, matrix, nullptr); | 196 color_xform_RGB1<kSRGB_DstGamma>(dst, src, len, srcTables, matrix, nullptr); |
197 } | 197 } |
198 | 198 |
199 static void color_xform_RGB1_to_table(uint32_t* dst, const uint32_t* src, int le
n, | 199 static void color_xform_RGB1_to_table(uint32_t* dst, const uint32_t* src, int le
n, |
200 const float* const srcTables[3], const flo
at matrix[12], | 200 const float* const srcTables[3], const flo
at matrix[16], |
201 const uint8_t* const dstTables[3]) { | 201 const uint8_t* const dstTables[3]) { |
202 color_xform_RGB1<kTable_DstGamma>(dst, src, len, srcTables, matrix, dstTable
s); | 202 color_xform_RGB1<kTable_DstGamma>(dst, src, len, srcTables, matrix, dstTable
s); |
203 } | 203 } |
204 | 204 |
205 static void color_xform_RGB1_to_linear(uint64_t* dst, const uint32_t* src, int l
en, | 205 static void color_xform_RGB1_to_linear(uint64_t* dst, const uint32_t* src, int l
en, |
206 const float* const srcTables[3], const fl
oat matrix[12]) { | 206 const float* const srcTables[3], const fl
oat matrix[16]) { |
207 color_xform_RGB1<kLinear_DstGamma>(dst, src, len, srcTables, matrix, nullptr
); | 207 color_xform_RGB1<kLinear_DstGamma>(dst, src, len, srcTables, matrix, nullptr
); |
208 } | 208 } |
209 | 209 |
210 } // namespace SK_OPTS_NS | 210 } // namespace SK_OPTS_NS |
211 | 211 |
212 #endif // SkColorXform_opts_DEFINED | 212 #endif // SkColorXform_opts_DEFINED |
OLD | NEW |