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_surface_DEFINED | 11 #ifndef sk_surface_DEFINED |
12 #define sk_surface_DEFINED | 12 #define sk_surface_DEFINED |
13 | 13 |
14 #include "sk_types.h" | 14 #include "sk_types.h" |
15 | 15 |
16 SK_C_PLUS_PLUS_BEGIN_GUARD | 16 SK_C_PLUS_PLUS_BEGIN_GUARD |
17 | 17 |
18 sk_surface_t* sk_surface_new_raster(const sk_imageinfo_t*); | 18 sk_surface_t* sk_surface_new_raster(const sk_imageinfo_t*); |
19 sk_surface_t* sk_surface_new_raster_direct(const sk_imageinfo_t*, void* pixels,
size_t rowBytes); | 19 sk_surface_t* sk_surface_new_raster_direct(const sk_imageinfo_t*, void* pixels,
size_t rowBytes); |
20 void sk_surface_delete(sk_surface_t*); | 20 void sk_surface_unref(sk_surface_t*); |
21 | 21 |
22 /** | 22 /** |
23 * Return the canvas associated with this surface. Note: the canvas is owned by
the surface, | 23 * Return the canvas associated with this surface. Note: the canvas is owned by
the surface, |
24 * so the returned object is only valid while the owning surface is valid. | 24 * so the returned object is only valid while the owning surface is valid. |
25 */ | 25 */ |
26 sk_canvas_t* sk_surface_get_canvas(sk_surface_t*); | 26 sk_canvas_t* sk_surface_get_canvas(sk_surface_t*); |
27 | 27 |
28 /** | 28 /** |
29 * Call sk_image_unref() when the returned image is no longer used. | 29 * Call sk_image_unref() when the returned image is no longer used. |
30 */ | 30 */ |
31 sk_image_t* sk_surface_new_image_snapshot(sk_surface_t*); | 31 sk_image_t* sk_surface_new_image_snapshot(sk_surface_t*); |
32 | 32 |
33 #ifdef __cplusplus | 33 #ifdef __cplusplus |
34 class SkCanvas; | 34 class SkCanvas; |
35 void sk_test_capi(SkCanvas*); | 35 void sk_test_capi(SkCanvas*); |
36 #endif | 36 #endif |
37 | 37 |
38 SK_C_PLUS_PLUS_END_GUARD | 38 SK_C_PLUS_PLUS_END_GUARD |
39 | 39 |
40 #endif | 40 #endif |
OLD | NEW |