OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 SkOpts_DEFINED | 8 #ifndef SkOpts_DEFINED |
9 #define SkOpts_DEFINED | 9 #define SkOpts_DEFINED |
10 | 10 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 RGB_to_BGR1, // i.e. swap RB and insert an opa
que alpha | 58 RGB_to_BGR1, // i.e. swap RB and insert an opa
que alpha |
59 gray_to_RGB1, // i.e. expand to color channels
+ an opaque alpha | 59 gray_to_RGB1, // i.e. expand to color channels
+ an opaque alpha |
60 grayA_to_RGBA, // i.e. expand to color channels | 60 grayA_to_RGBA, // i.e. expand to color channels |
61 grayA_to_rgbA, // i.e. expand to color channels
and premultiply | 61 grayA_to_rgbA, // i.e. expand to color channels
and premultiply |
62 inverted_CMYK_to_RGB1, // i.e. convert color space | 62 inverted_CMYK_to_RGB1, // i.e. convert color space |
63 inverted_CMYK_to_BGR1; // i.e. convert color space | 63 inverted_CMYK_to_BGR1; // i.e. convert color space |
64 | 64 |
65 // Blend ndst src pixels over dst, where both src and dst point to sRGB pixe
ls (RGBA or BGRA). | 65 // Blend ndst src pixels over dst, where both src and dst point to sRGB pixe
ls (RGBA or BGRA). |
66 // If nsrc < ndst, we loop over src to create a pattern. | 66 // If nsrc < ndst, we loop over src to create a pattern. |
67 extern void (*srcover_srgb_srgb)(uint32_t* dst, const uint32_t* src, int nds
t, int nsrc); | 67 extern void (*srcover_srgb_srgb)(uint32_t* dst, const uint32_t* src, int nds
t, int nsrc); |
| 68 |
| 69 // The fastest high quality 32-bit hash we can provide on this platform. |
| 70 extern uint32_t (*hash_fn)(const void*, size_t, uint32_t seed); |
| 71 static inline uint32_t hash(const void* data, size_t bytes, uint32_t seed=0)
{ |
| 72 return hash_fn(data, bytes, seed); |
| 73 } |
68 } | 74 } |
69 | 75 |
70 #endif//SkOpts_DEFINED | 76 #endif//SkOpts_DEFINED |
OLD | NEW |