Chromium Code Reviews| 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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 253 SkNx_cast<uint8_t>(dstPixel).store(&rgba); | 253 SkNx_cast<uint8_t>(dstPixel).store(&rgba); |
| 254 rgba |= 0xFF000000; | 254 rgba |= 0xFF000000; |
| 255 *dst = rgba; | 255 *dst = rgba; |
| 256 | 256 |
| 257 dst += 1; | 257 dst += 1; |
| 258 src += 1; | 258 src += 1; |
| 259 len -= 1; | 259 len -= 1; |
| 260 } | 260 } |
| 261 } | 261 } |
| 262 | 262 |
| 263 static void color_xform_RGB1_srgb_to_2dot2(uint32_t* dst, const uint32_t* src, i nt len, | 263 inline void color_xform_RGB1_srgb_to_2dot2(uint32_t* dst, const uint32_t* src, i nt len, |
|
mtklein_C
2016/06/21 20:32:52
?
These should probably be best as static inline.
msarett
2016/06/21 21:24:47
Think we can just go back to static now that I'm n
| |
| 264 const float matrix[16]) { | 264 const float matrix[16]) { |
| 265 color_xform_RGB1<linear_from_srgb, linear_to_2dot2>(dst, src, len, matrix); | 265 color_xform_RGB1<linear_from_srgb, linear_to_2dot2>(dst, src, len, matrix); |
| 266 } | 266 } |
| 267 | 267 |
| 268 static void color_xform_RGB1_2dot2_to_2dot2(uint32_t* dst, const uint32_t* src, int len, | 268 inline void color_xform_RGB1_2dot2_to_2dot2(uint32_t* dst, const uint32_t* src, int len, |
| 269 const float matrix[16]) { | 269 const float matrix[16]) { |
| 270 color_xform_RGB1<linear_from_2dot2, linear_to_2dot2>(dst, src, len, matrix); | 270 color_xform_RGB1<linear_from_2dot2, linear_to_2dot2>(dst, src, len, matrix); |
| 271 } | 271 } |
| 272 | 272 |
| 273 static void color_xform_RGB1_srgb_to_srgb(uint32_t* dst, const uint32_t* src, in t len, | 273 inline void color_xform_RGB1_srgb_to_srgb(uint32_t* dst, const uint32_t* src, in t len, |
| 274 const float matrix[16]) { | 274 const float matrix[16]) { |
| 275 color_xform_RGB1<linear_from_srgb, linear_to_srgb>(dst, src, len, matrix); | 275 color_xform_RGB1<linear_from_srgb, linear_to_srgb>(dst, src, len, matrix); |
| 276 } | 276 } |
| 277 | 277 |
| 278 static void color_xform_RGB1_2dot2_to_srgb(uint32_t* dst, const uint32_t* src, i nt len, | 278 inline void color_xform_RGB1_2dot2_to_srgb(uint32_t* dst, const uint32_t* src, i nt len, |
| 279 const float matrix[16]) { | 279 const float matrix[16]) { |
| 280 color_xform_RGB1<linear_from_2dot2, linear_to_srgb>(dst, src, len, matrix); | 280 color_xform_RGB1<linear_from_2dot2, linear_to_srgb>(dst, src, len, matrix); |
| 281 } | 281 } |
| 282 | 282 |
| 283 } // namespace SK_OPTS_NS | 283 } // namespace SK_OPTS_NS |
| 284 | 284 |
| 285 #endif // SkColorXform_opts_DEFINED | 285 #endif // SkColorXform_opts_DEFINED |
| OLD | NEW |