| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 // EXPERIMENTAL EXPERIMENTAL EXPERIMENTAL EXPERIMENTAL | 8 // EXPERIMENTAL EXPERIMENTAL EXPERIMENTAL EXPERIMENTAL |
| 9 // DO NOT USE -- FOR INTERNAL TESTING ONLY | 9 // DO NOT USE -- FOR INTERNAL TESTING ONLY |
| 10 | 10 |
| 11 #ifndef sk_types_DEFINED | 11 #ifndef sk_types_DEFINED |
| 12 #define sk_types_DEFINED | 12 #define sk_types_DEFINED |
| 13 | 13 |
| 14 #include <stdint.h> | 14 #include <stdint.h> |
| 15 #include <stddef.h> | 15 #include <stddef.h> |
| 16 | 16 |
| 17 #ifdef __cplusplus | 17 #ifdef __cplusplus |
| 18 #define SK_C_PLUS_PLUS_BEGIN_GUARD extern "C" { | 18 #define SK_C_PLUS_PLUS_BEGIN_GUARD extern "C" { |
| 19 #define SK_C_PLUS_PLUS_END_GUARD } | 19 #define SK_C_PLUS_PLUS_END_GUARD } |
| 20 #else | 20 #else |
| 21 #include <stdbool.h> | 21 #include <stdbool.h> |
| 22 #define SK_C_PLUS_PLUS_BEGIN_GUARD | 22 #define SK_C_PLUS_PLUS_BEGIN_GUARD |
| 23 #define SK_C_PLUS_PLUS_END_GUARD | 23 #define SK_C_PLUS_PLUS_END_GUARD |
| 24 #endif | 24 #endif |
| 25 | 25 |
| 26 #ifndef SK_API |
| 27 #define SK_API |
| 28 #endif |
| 29 |
| 26 ////////////////////////////////////////////////////////////////////////////////
/////// | 30 ////////////////////////////////////////////////////////////////////////////////
/////// |
| 27 | 31 |
| 28 SK_C_PLUS_PLUS_BEGIN_GUARD | 32 SK_C_PLUS_PLUS_BEGIN_GUARD |
| 29 | 33 |
| 30 typedef uint32_t sk_color_t; | 34 typedef uint32_t sk_color_t; |
| 31 | 35 |
| 32 #define sk_color_set_argb(a, r, g, b) (((a) << 24) | ((r) << 16) | ((g) << 8)
| (b)) | 36 #define sk_color_set_argb(a, r, g, b) (((a) << 24) | ((r) << 16) | ((g) << 8)
| (b)) |
| 33 #define sk_color_get_a(c) (((c) >> 24) & 0xFF) | 37 #define sk_color_get_a(c) (((c) >> 24) & 0xFF) |
| 34 #define sk_color_get_r(c) (((c) >> 16) & 0xFF) | 38 #define sk_color_get_r(c) (((c) >> 16) & 0xFF) |
| 35 #define sk_color_get_g(c) (((c) >> 8) & 0xFF) | 39 #define sk_color_get_g(c) (((c) >> 8) & 0xFF) |
| (...skipping 18 matching lines...) Expand all Loading... |
| 54 } sk_cliptype_t; | 58 } sk_cliptype_t; |
| 55 | 59 |
| 56 typedef enum { | 60 typedef enum { |
| 57 UNKNOWN_SK_PIXELGEOMETRY, | 61 UNKNOWN_SK_PIXELGEOMETRY, |
| 58 RGB_H_SK_PIXELGEOMETRY, | 62 RGB_H_SK_PIXELGEOMETRY, |
| 59 BGR_H_SK_PIXELGEOMETRY, | 63 BGR_H_SK_PIXELGEOMETRY, |
| 60 RGB_V_SK_PIXELGEOMETRY, | 64 RGB_V_SK_PIXELGEOMETRY, |
| 61 BGR_V_SK_PIXELGEOMETRY, | 65 BGR_V_SK_PIXELGEOMETRY, |
| 62 } sk_pixelgeometry_t; | 66 } sk_pixelgeometry_t; |
| 63 | 67 |
| 64 sk_colortype_t sk_colortype_get_default_8888(); | 68 SK_API sk_colortype_t sk_colortype_get_default_8888(); |
| 65 | 69 |
| 66 typedef struct { | 70 typedef struct { |
| 67 int32_t width; | 71 int32_t width; |
| 68 int32_t height; | 72 int32_t height; |
| 69 sk_colortype_t colorType; | 73 sk_colortype_t colorType; |
| 70 sk_alphatype_t alphaType; | 74 sk_alphatype_t alphaType; |
| 71 } sk_imageinfo_t; | 75 } sk_imageinfo_t; |
| 72 | 76 |
| 73 typedef struct { | 77 typedef struct { |
| 74 sk_pixelgeometry_t pixelGeometry; | 78 sk_pixelgeometry_t pixelGeometry; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 SATURATION_SK_XFERMODE_MODE, | 142 SATURATION_SK_XFERMODE_MODE, |
| 139 COLOR_SK_XFERMODE_MODE, | 143 COLOR_SK_XFERMODE_MODE, |
| 140 LUMINOSITY_SK_XFERMODE_MODE, | 144 LUMINOSITY_SK_XFERMODE_MODE, |
| 141 } sk_xfermode_mode_t; | 145 } sk_xfermode_mode_t; |
| 142 | 146 |
| 143 ////////////////////////////////////////////////////////////////////////////////
////////// | 147 ////////////////////////////////////////////////////////////////////////////////
////////// |
| 144 | 148 |
| 145 SK_C_PLUS_PLUS_END_GUARD | 149 SK_C_PLUS_PLUS_END_GUARD |
| 146 | 150 |
| 147 #endif | 151 #endif |
| OLD | NEW |