Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(700)

Side by Side Diff: src/opts/SkColorXform_opts.h

Issue 2166093003: Miscellaneous color space refactors (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Tweak SkColorLookUpTable constructor Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« src/core/SkColorSpace_Base.h ('K') | « src/core/SkOpts.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« src/core/SkColorSpace_Base.h ('K') | « src/core/SkOpts.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698