Updating Xamarin/Microsoft file headers
[platform/upstream/libSkiaSharp.git] / include / c / sk_surface.h
1 /*
2  * Copyright 2014 Google Inc.
3  * Copyright 2015 Xamarin Inc.
4  * Copyright 2017 Microsoft Corporation. All rights reserved.
5  *
6  * Use of this source code is governed by a BSD-style license that can be
7  * found in the LICENSE file.
8  */
9
10 #ifndef sk_surface_DEFINED
11 #define sk_surface_DEFINED
12
13 #include "sk_types.h"
14
15 SK_C_PLUS_PLUS_BEGIN_GUARD
16
17 SK_C_API sk_colortype_t sk_colortype_get_default_8888(void);
18
19 SK_C_API sk_surface_t* sk_surface_new_raster(const sk_imageinfo_t*, const sk_surfaceprops_t*);
20 SK_C_API sk_surface_t* sk_surface_new_raster_direct(const sk_imageinfo_t*, void* pixels, size_t rowBytes, const sk_surfaceprops_t* props);
21 SK_C_API void sk_surface_unref(sk_surface_t*);
22 SK_C_API sk_canvas_t* sk_surface_get_canvas(sk_surface_t*);
23 SK_C_API sk_image_t* sk_surface_new_image_snapshot(sk_surface_t*);
24 SK_C_API sk_surface_t* sk_surface_new_backend_render_target(gr_context_t* context, const gr_backend_rendertarget_desc_t* desc, const sk_surfaceprops_t* props);
25 SK_C_API sk_surface_t* sk_surface_new_backend_texture(gr_context_t* context, const gr_backend_texture_desc_t* desc, const sk_surfaceprops_t* props);
26 SK_C_API sk_surface_t* sk_surface_new_backend_texture_as_render_target(gr_context_t* context, const gr_backend_texture_desc_t* desc, const sk_surfaceprops_t* props);
27 SK_C_API sk_surface_t* sk_surface_new_render_target(gr_context_t* context, bool budgeted, const sk_imageinfo_t* info, int sampleCount, const sk_surfaceprops_t* props);
28 SK_C_API void sk_surface_draw(sk_surface_t* surface, sk_canvas_t* canvas, float x, float y, const sk_paint_t* paint);
29 SK_C_API bool sk_surface_peek_pixels(sk_surface_t* surface, sk_pixmap_t* pixmap);
30 SK_C_API bool sk_surface_read_pixels(sk_surface_t* surface, sk_imageinfo_t* dstInfo, void* dstPixels, size_t dstRowBytes, int srcX, int srcY);
31 SK_C_API void sk_surface_get_props(sk_surface_t* surface, sk_surfaceprops_t* props);
32
33 SK_C_PLUS_PLUS_END_GUARD
34
35 #endif