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 | 26 #if !defined(SK_API) |
27 #define SK_API | 27 #if defined(SKIA_DLL) |
| 28 #if defined(SK_BUILD_FOR_WIN32) |
| 29 #if SKIA_IMPLEMENTATION |
| 30 #define SK_API __declspec(dllexport) |
| 31 #else |
| 32 #define SK_API __declspec(dllimport) |
| 33 #endif |
| 34 #else |
| 35 #define SK_API __attribute__((visibility("default"))) |
| 36 #endif |
| 37 #else |
| 38 #define SK_API |
| 39 #endif |
28 #endif | 40 #endif |
29 | 41 |
30 ////////////////////////////////////////////////////////////////////////////////
/////// | 42 ////////////////////////////////////////////////////////////////////////////////
/////// |
31 | 43 |
32 SK_C_PLUS_PLUS_BEGIN_GUARD | 44 SK_C_PLUS_PLUS_BEGIN_GUARD |
33 | 45 |
34 typedef uint32_t sk_color_t; | 46 typedef uint32_t sk_color_t; |
35 | 47 |
36 /* This macro assumes all arguments are >=0 and <=255. */ | 48 /* This macro assumes all arguments are >=0 and <=255. */ |
37 #define sk_color_set_argb(a, r, g, b) (((a) << 24) | ((r) << 16) | ((g) << 8)
| (b)) | 49 #define sk_color_set_argb(a, r, g, b) (((a) << 24) | ((r) << 16) | ((g) << 8)
| (b)) |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 SATURATION_SK_XFERMODE_MODE, | 208 SATURATION_SK_XFERMODE_MODE, |
197 COLOR_SK_XFERMODE_MODE, | 209 COLOR_SK_XFERMODE_MODE, |
198 LUMINOSITY_SK_XFERMODE_MODE, | 210 LUMINOSITY_SK_XFERMODE_MODE, |
199 } sk_xfermode_mode_t; | 211 } sk_xfermode_mode_t; |
200 | 212 |
201 ////////////////////////////////////////////////////////////////////////////////
////////// | 213 ////////////////////////////////////////////////////////////////////////////////
////////// |
202 | 214 |
203 SK_C_PLUS_PLUS_END_GUARD | 215 SK_C_PLUS_PLUS_END_GUARD |
204 | 216 |
205 #endif | 217 #endif |
OLD | NEW |