2 * Copyright 2016 Xamarin Inc.
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
8 // EXPERIMENTAL EXPERIMENTAL EXPERIMENTAL EXPERIMENTAL
9 // DO NOT USE -- FOR INTERNAL TESTING ONLY
11 #ifndef gr_context_DEFINED
12 #define gr_context_DEFINED
16 SK_C_PLUS_PLUS_BEGIN_GUARD
18 SK_C_API gr_context_t* gr_context_create(gr_backend_t backend, gr_backendcontext_t backendContext, const gr_context_options_t* options);
19 SK_C_API gr_context_t* gr_context_create_with_defaults(gr_backend_t backend, gr_backendcontext_t backendContext);
20 SK_C_API void gr_context_unref(gr_context_t* context);
21 SK_C_API void gr_context_abandon_context(gr_context_t* context);
22 SK_C_API void gr_context_release_resources_and_abandon_context(gr_context_t* context);
23 SK_C_API void gr_context_get_resource_cache_limits(gr_context_t* context, int* maxResources, size_t* maxResourceBytes);
24 SK_C_API void gr_context_set_resource_cache_limits(gr_context_t* context, int maxResources, size_t maxResourceBytes);
25 SK_C_API void gr_context_get_resource_cache_usage(gr_context_t* context, int* maxResources, size_t* maxResourceBytes);
26 SK_C_API int gr_context_get_recommended_sample_count(gr_context_t* context, gr_pixelconfig_t config, float dpi);
27 SK_C_API void gr_context_flush(gr_context_t* context);
28 SK_C_API void gr_context_reset_context(gr_context_t* context, uint32_t state);
30 SK_C_API const gr_glinterface_t* gr_glinterface_default_interface();
31 SK_C_API const gr_glinterface_t* gr_glinterface_create_native_interface();
32 SK_C_API const gr_glinterface_t* gr_glinterface_assemble_interface(void* ctx, gr_gl_get_proc get);
33 SK_C_API const gr_glinterface_t* gr_glinterface_assemble_gl_interface(void* ctx, gr_gl_get_proc get);
34 SK_C_API const gr_glinterface_t* gr_glinterface_assemble_gles_interface(void* ctx, gr_gl_get_proc get);
35 SK_C_API void gr_glinterface_unref(gr_glinterface_t* glInterface);
36 SK_C_API gr_glinterface_t* gr_glinterface_clone(gr_glinterface_t* glInterface);
37 SK_C_API bool gr_glinterface_validate(gr_glinterface_t* glInterface);
38 SK_C_API bool gr_glinterface_has_extension(gr_glinterface_t* glInterface, const char* extension);
40 SK_C_PLUS_PLUS_END_GUARD