1 /*
2  * Copyright 2014 Google Inc.
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7 
8 #include "include/gpu/gl/GrGLInterface.h"
9 
10 typedef GrGLFuncPtr (*GrGLGetProc)(void* ctx, const char name[]);
11 
12 /**
13  * Generic function for creating a GrGLInterface for an either OpenGL or GLES. It calls
14  * get() to get each function address. ctx is a generic ptr passed to and interpreted by get().
15  */
16 SK_API sk_sp<const GrGLInterface> GrGLMakeAssembledInterface(void *ctx, GrGLGetProc get);
17 
18 /**
19  * Generic function for creating a GrGLInterface for an OpenGL (but not GLES) context. It calls
20  * get() to get each function address. ctx is a generic ptr passed to and interpreted by get().
21  */
22 SK_API sk_sp<const GrGLInterface> GrGLMakeAssembledGLInterface(void *ctx, GrGLGetProc get);
23 
24 /**
25  * Generic function for creating a GrGLInterface for an OpenGL ES (but not Open GL) context. It
26  * calls get() to get each function address. ctx is a generic ptr passed to and interpreted by
27  * get().
28  */
29 SK_API sk_sp<const GrGLInterface> GrGLMakeAssembledGLESInterface(void *ctx, GrGLGetProc get);
30 
31 /**
32  * Generic function for creating a GrGLInterface for a WebGL (similar to OpenGL ES) context. It
33  * calls get() to get each function address. ctx is a generic ptr passed to and interpreted by
34  * get().
35  */
36 SK_API sk_sp<const GrGLInterface> GrGLMakeAssembledWebGLInterface(void *ctx, GrGLGetProc get);
37 
38 /** Deprecated version of GrGLMakeAssembledInterface() that returns a bare pointer. */
39 SK_API const GrGLInterface* GrGLAssembleInterface(void *ctx, GrGLGetProc get);
40