| 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 #ifndef __cplusplus |
| 18 #include <stdbool.h> |
| 19 #endif |
| 20 |
| 17 #ifdef __cplusplus | 21 #ifdef __cplusplus |
| 18 extern "C" { | 22 extern "C" { |
| 19 #endif | 23 #endif |
| 20 | 24 |
| 21 typedef uint32_t sk_color_t; | 25 typedef uint32_t sk_color_t; |
| 22 | 26 |
| 23 #define sk_color_set_argb(a, r, g, b) (((a) << 24) | ((r) << 16) | ((g) << 8)
| (b)) | 27 #define sk_color_set_argb(a, r, g, b) (((a) << 24) | ((r) << 16) | ((g) << 8)
| (b)) |
| 24 #define sk_color_get_a(c) (((c) >> 24) & 0xFF) | 28 #define sk_color_get_a(c) (((c) >> 24) & 0xFF) |
| 25 #define sk_color_get_r(c) (((c) >> 16) & 0xFF) | 29 #define sk_color_get_r(c) (((c) >> 16) & 0xFF) |
| 26 #define sk_color_get_g(c) (((c) >> 8) & 0xFF) | 30 #define sk_color_get_g(c) (((c) >> 8) & 0xFF) |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 sk_canvas_t* sk_surface_get_canvas(sk_surface_t*); | 117 sk_canvas_t* sk_surface_get_canvas(sk_surface_t*); |
| 114 sk_image_t* sk_surface_new_image_snapshot(sk_surface_t*); | 118 sk_image_t* sk_surface_new_image_snapshot(sk_surface_t*); |
| 115 | 119 |
| 116 #ifdef __cplusplus | 120 #ifdef __cplusplus |
| 117 class SkCanvas; | 121 class SkCanvas; |
| 118 void sk_test_capi(SkCanvas*); | 122 void sk_test_capi(SkCanvas*); |
| 119 } | 123 } |
| 120 #endif | 124 #endif |
| 121 | 125 |
| 122 #endif | 126 #endif |
| OLD | NEW |