75 if (config ==
nullptr) {
98 const EGLint* attrib_list,
101 EGLint* num_config) {
107 if (num_config !=
nullptr) {
113 EGLint n_returned = 0;
114 if (config_size >= 1) {
119 if (num_config !=
nullptr) {
120 *num_config = n_returned;
128 EGLContext share_context,
129 const EGLint* attrib_list) {
131 return EGL_NO_CONTEXT;
140 const EGLint* attrib_list) {
142 return EGL_NO_SURFACE;
151 EGLNativeWindowType win,
152 const EGLint* attrib_list) {
154 return EGL_NO_SURFACE;
174 case EGL_BUFFER_SIZE:
177 case EGL_COLOR_BUFFER_TYPE:
180 case EGL_TRANSPARENT_TYPE:
201 case EGL_STENCIL_SIZE:
207 case EGL_SAMPLE_BUFFERS:
210 case EGL_NATIVE_VISUAL_ID:
213 case EGL_NATIVE_VISUAL_TYPE:
216 case EGL_NATIVE_RENDERABLE:
219 case EGL_CONFIG_CAVEAT:
222 case EGL_BIND_TO_TEXTURE_RGB:
225 case EGL_BIND_TO_TEXTURE_RGBA:
228 case EGL_RENDERABLE_TYPE:
234 case EGL_SURFACE_TYPE:
237 case EGL_MAX_PBUFFER_WIDTH:
240 case EGL_MAX_PBUFFER_HEIGHT:
243 case EGL_MAX_PBUFFER_PIXELS:
246 case EGL_MIN_SWAP_INTERVAL:
249 case EGL_MAX_SWAP_INTERVAL:
308 if (major !=
nullptr) {
311 if (minor !=
nullptr) {
332 if (attribute == EGL_CONTEXT_CLIENT_TYPE) {
333 *
value = EGL_OPENGL_API;
352 if (
target == GL_TEXTURE_2D) {
368 for (GLsizei
i = 0;
i < n;
i++) {
374 for (GLsizei
i = 0;
i < n;
i++) {
380 if (pname == GL_TEXTURE_BINDING_2D) {
391 GLint internalformat,
397 const void* pixels) {}
416#define CONSTRUCT(_func) static void _func(void) __attribute__((constructor));
417#define DESTRUCT(_func) static void _func(void) __attribute__((destructor));
418#elif defined(_MSC_VER) && (_MSC_VER >= 1500)
419#define CONSTRUCT(_func) \
420 static void _func(void); \
421 static int _func##_wrapper(void) { \
425 __pragma(section(".CRT$XCU", read)) \
426 __declspec(allocate(".CRT$XCU")) static int (*_array##_func)(void) = \
430#error "You will need constructor support for your compiler"
437 const EGLint* attrib_list,
443 EGLContext share_context,
444 const EGLint* attrib_list);
447 const EGLint* attrib_list);
450 EGLNativeWindowType win,
451 const EGLint* attrib_list);
481 GLint internalformat,
static bool read(SkStream *stream, void *buffer, size_t amount)
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
const uint8_t uint32_t uint32_t GError ** error
uint32_t uint32_t * format
static EGLBoolean bool_failure(EGLint error)
static void _glGenFramebuffers(GLsizei n, GLuint *framebuffers)
static bool check_config(EGLConfig config)
void(* epoxy_glBindTexture)(GLenum target, GLuint texture)
EGLBoolean _eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value)
EGLSurface(* epoxy_eglCreateWindowSurface)(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list)
EGLBoolean _eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config)
void(* epoxy_glDeleteTextures)(GLsizei n, const GLuint *textures)
EGLBoolean _eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
static void _glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
EGLBoolean _eglQueryContext(EGLDisplay display, EGLContext context, EGLint attribute, EGLint *value)
static GLuint bound_texture_2d
void(* epoxy_glGenFramebuffers)(GLsizei n, GLuint *framebuffers)
bool epoxy_has_gl_extension(const char *extension)
void(* epoxy_glTexParameteri)(GLenum target, GLenum pname, GLint param)
static MockContext mock_context
static void library_init()
void(* epoxy_glTexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels)
static void _glTexParameteri(GLenum target, GLenum pname, GLint param)
static void _glTexParameterf(GLenum target, GLenum pname, GLfloat param)
void(*(* epoxy_eglGetProcAddress)(const char *procname))(void)
EGLSurface _eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list)
EGLBoolean _eglBindAPI(EGLenum api)
EGLContext(* epoxy_eglCreateContext)(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list)
static void _glBindFramebuffer(GLenum target, GLuint framebuffer)
static bool check_initialized(EGLDisplay dpy)
EGLBoolean(* epoxy_eglGetConfigAttrib)(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value)
static MockConfig mock_config
void(* epoxy_glDeleteFramebuffers)(GLsizei n, const GLuint *framebuffers)
void(* epoxy_glTexParameterf)(GLenum target, GLenum pname, GLfloat param)
EGLBoolean(* epoxy_eglInitialize)(EGLDisplay dpy, EGLint *major, EGLint *minor)
static void _glBindTexture(GLenum target, GLuint texture)
EGLDisplay _eglGetDisplay(EGLNativeDisplayType display_id)
static bool check_display(EGLDisplay dpy)
void(* epoxy_glGenTextures)(GLsizei n, GLuint *textures)
void _glDeleteTextures(GLsizei n, const GLuint *textures)
void(* epoxy_glBindFramebuffer)(GLenum target, GLuint framebuffer)
EGLSurface _eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list)
EGLSurface(* epoxy_eglCreatePbufferSurface)(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list)
static bool display_initialized
void _glDeleteFramebuffers(GLsizei n, const GLuint *framebuffers)
static void _glGenTextures(GLsizei n, GLuint *textures)
void(*)(void) _eglGetProcAddress(const char *procname)
EGLDisplay(* epoxy_eglGetDisplay)(EGLNativeDisplayType display_id)
EGLint(* epoxy_eglGetError)()
static EGLBoolean bool_success()
static void _glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels)
GLenum(* epoxy_glGetError)()
bool epoxy_is_desktop_gl(void)
int epoxy_gl_version(void)
EGLBoolean(* epoxy_eglSwapBuffers)(EGLDisplay dpy, EGLSurface surface)
EGLContext _eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list)
EGLBoolean _eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx)
EGLBoolean(* epoxy_eglMakeCurrent)(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx)
EGLBoolean(* epoxy_eglBindAPI)(EGLenum api)
static void _glGetIntegerv(GLenum pname, GLint *data)
EGLBoolean(* epoxy_eglChooseConfig)(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config)
static MockDisplay mock_display
static MockSurface mock_surface
void(* epoxy_glFramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
EGLBoolean _eglSwapBuffers(EGLDisplay dpy, EGLSurface surface)
static GLenum _glGetError()
EGLint bind_to_texture_rgba
EGLint native_visual_type
EGLint max_pbuffer_pixels
EGLint max_pbuffer_height
EGLint bind_to_texture_rgb
std::shared_ptr< const fml::Mapping > data