Flutter Engine
mock_epoxy.cc
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 
6 #include <epoxy/egl.h>
7 #include <epoxy/gl.h>
8 
9 typedef struct {
10  EGLint config_id;
11  EGLint buffer_size;
14  EGLint level;
15  EGLint red_size;
16  EGLint green_size;
17  EGLint blue_size;
18  EGLint alpha_size;
19  EGLint depth_size;
20  EGLint stencil_size;
21  EGLint samples;
26  EGLint config_caveat;
30  EGLint conformant;
31  EGLint surface_type;
37 } MockConfig;
38 
39 typedef struct {
40 } MockDisplay;
41 
42 typedef struct {
43 } MockContext;
44 
45 typedef struct {
46 } MockSurface;
47 
48 static bool display_initialized = false;
53 
54 static EGLint mock_error = EGL_SUCCESS;
55 
56 static bool check_display(EGLDisplay dpy) {
57  if (dpy == nullptr) {
58  mock_error = EGL_BAD_DISPLAY;
59  return false;
60  }
61 
62  return true;
63 }
64 
65 static bool check_initialized(EGLDisplay dpy) {
66  if (!display_initialized) {
67  mock_error = EGL_NOT_INITIALIZED;
68  return false;
69  }
70 
71  return true;
72 }
73 
74 static bool check_config(EGLConfig config) {
75  if (config == nullptr) {
76  mock_error = EGL_BAD_CONFIG;
77  return false;
78  }
79 
80  return true;
81 }
82 
83 static EGLBoolean bool_success() {
84  mock_error = EGL_SUCCESS;
85  return EGL_TRUE;
86 }
87 
88 static EGLBoolean bool_failure(EGLint error) {
89  mock_error = error;
90  return EGL_FALSE;
91 }
92 
93 EGLBoolean _eglBindAPI(EGLenum api) {
94  return bool_success();
95 }
96 
97 EGLBoolean _eglChooseConfig(EGLDisplay dpy,
98  const EGLint* attrib_list,
99  EGLConfig* configs,
100  EGLint config_size,
101  EGLint* num_config) {
102  if (!check_display(dpy) || !check_initialized(dpy)) {
103  return EGL_FALSE;
104  }
105 
106  if (configs == nullptr) {
107  if (num_config != nullptr) {
108  *num_config = 1;
109  }
110  return bool_success();
111  }
112 
113  EGLint n_returned = 0;
114  if (config_size >= 1) {
115  configs[0] = &mock_config;
116  n_returned++;
117  }
118 
119  if (num_config != nullptr) {
120  *num_config = n_returned;
121  }
122 
123  return bool_success();
124 }
125 
126 EGLContext _eglCreateContext(EGLDisplay dpy,
127  EGLConfig config,
128  EGLContext share_context,
129  const EGLint* attrib_list) {
130  if (!check_display(dpy) || !check_initialized(dpy) || !check_config(config)) {
131  return EGL_NO_CONTEXT;
132  }
133 
134  mock_error = EGL_SUCCESS;
135  return &mock_context;
136 }
137 
138 EGLSurface _eglCreatePbufferSurface(EGLDisplay dpy,
139  EGLConfig config,
140  const EGLint* attrib_list) {
141  if (!check_display(dpy) || !check_initialized(dpy) || !check_config(config)) {
142  return EGL_NO_SURFACE;
143  }
144 
145  mock_error = EGL_SUCCESS;
146  return &mock_surface;
147 }
148 
149 EGLSurface _eglCreateWindowSurface(EGLDisplay dpy,
150  EGLConfig config,
151  EGLNativeWindowType win,
152  const EGLint* attrib_list) {
153  if (!check_display(dpy) || !check_initialized(dpy) || !check_config(config)) {
154  return EGL_NO_SURFACE;
155  }
156 
157  mock_error = EGL_SUCCESS;
158  return &mock_surface;
159 }
160 
161 EGLBoolean _eglGetConfigAttrib(EGLDisplay dpy,
162  EGLConfig config,
163  EGLint attribute,
164  EGLint* value) {
165  if (!check_display(dpy) || !check_initialized(dpy) || !check_config(config)) {
166  return EGL_FALSE;
167  }
168 
169  MockConfig* c = static_cast<MockConfig*>(config);
170  switch (attribute) {
171  case EGL_CONFIG_ID:
172  *value = c->config_id;
173  return bool_success();
174  case EGL_BUFFER_SIZE:
175  *value = c->buffer_size;
176  return bool_success();
177  case EGL_COLOR_BUFFER_TYPE:
178  *value = c->color_buffer_type;
179  return bool_success();
180  case EGL_TRANSPARENT_TYPE:
181  *value = c->transparent_type;
182  return bool_success();
183  case EGL_LEVEL:
184  *value = c->level;
185  return bool_success();
186  case EGL_RED_SIZE:
187  *value = c->red_size;
188  return bool_success();
189  case EGL_GREEN_SIZE:
190  *value = c->green_size;
191  return bool_success();
192  case EGL_BLUE_SIZE:
193  *value = c->blue_size;
194  return bool_success();
195  case EGL_ALPHA_SIZE:
196  *value = c->alpha_size;
197  return bool_success();
198  case EGL_DEPTH_SIZE:
199  *value = c->depth_size;
200  return bool_success();
201  case EGL_STENCIL_SIZE:
202  *value = c->stencil_size;
203  return bool_success();
204  case EGL_SAMPLES:
205  *value = c->samples;
206  return bool_success();
207  case EGL_SAMPLE_BUFFERS:
208  *value = c->sample_buffers;
209  return bool_success();
210  case EGL_NATIVE_VISUAL_ID:
211  *value = c->native_visual_id;
212  return bool_success();
213  case EGL_NATIVE_VISUAL_TYPE:
214  *value = c->native_visual_type;
215  return bool_success();
216  case EGL_NATIVE_RENDERABLE:
217  *value = c->native_renderable;
218  return bool_success();
219  case EGL_CONFIG_CAVEAT:
220  *value = c->config_caveat;
221  return bool_success();
222  case EGL_BIND_TO_TEXTURE_RGB:
223  *value = c->bind_to_texture_rgb;
224  return bool_success();
225  case EGL_BIND_TO_TEXTURE_RGBA:
226  *value = c->bind_to_texture_rgba;
227  return bool_success();
228  case EGL_RENDERABLE_TYPE:
229  *value = c->renderable_type;
230  return bool_success();
231  case EGL_CONFORMANT:
232  *value = c->conformant;
233  return bool_success();
234  case EGL_SURFACE_TYPE:
235  *value = c->surface_type;
236  return bool_success();
237  case EGL_MAX_PBUFFER_WIDTH:
238  *value = c->max_pbuffer_width;
239  return bool_success();
240  case EGL_MAX_PBUFFER_HEIGHT:
241  *value = c->max_pbuffer_height;
242  return bool_success();
243  case EGL_MAX_PBUFFER_PIXELS:
244  *value = c->max_pbuffer_pixels;
245  return bool_success();
246  case EGL_MIN_SWAP_INTERVAL:
247  *value = c->min_swap_interval;
248  return bool_success();
249  case EGL_MAX_SWAP_INTERVAL:
250  *value = c->max_swap_interval;
251  return bool_success();
252  default:
253  return bool_failure(EGL_BAD_ATTRIBUTE);
254  }
255 }
256 
257 EGLDisplay _eglGetDisplay(EGLNativeDisplayType display_id) {
258  return &mock_display;
259 }
260 
261 EGLint _eglGetError() {
262  EGLint error = mock_error;
263  mock_error = EGL_SUCCESS;
264  return error;
265 }
266 
267 void (*_eglGetProcAddress(const char* procname))(void) {
268  mock_error = EGL_SUCCESS;
269  return nullptr;
270 }
271 
272 EGLBoolean _eglInitialize(EGLDisplay dpy, EGLint* major, EGLint* minor) {
273  if (!check_display(dpy)) {
274  return EGL_FALSE;
275  }
276 
277  if (!display_initialized) {
278  mock_config.config_id = 1;
279  mock_config.buffer_size = 32;
280  mock_config.color_buffer_type = EGL_RGB_BUFFER;
281  mock_config.transparent_type = EGL_NONE;
282  mock_config.level = 1;
283  mock_config.red_size = 8;
284  mock_config.green_size = 8;
285  mock_config.blue_size = 8;
286  mock_config.alpha_size = 0;
287  mock_config.depth_size = 0;
288  mock_config.stencil_size = 0;
289  mock_config.samples = 0;
290  mock_config.sample_buffers = 0;
291  mock_config.native_visual_id = 1;
292  mock_config.native_visual_type = 0;
293  mock_config.native_renderable = EGL_TRUE;
294  mock_config.config_caveat = EGL_NONE;
295  mock_config.bind_to_texture_rgb = EGL_TRUE;
296  mock_config.bind_to_texture_rgba = EGL_FALSE;
297  mock_config.renderable_type = EGL_OPENGL_ES2_BIT;
298  mock_config.conformant = EGL_OPENGL_ES2_BIT;
299  mock_config.surface_type = EGL_WINDOW_BIT | EGL_PBUFFER_BIT;
300  mock_config.max_pbuffer_width = 1024;
301  mock_config.max_pbuffer_height = 1024;
302  mock_config.max_pbuffer_pixels = 1024 * 1024;
303  mock_config.min_swap_interval = 0;
304  mock_config.max_swap_interval = 1000;
305  display_initialized = true;
306  }
307 
308  if (major != nullptr) {
309  *major = 1;
310  }
311  if (minor != nullptr) {
312  *minor = 5;
313  }
314 
315  return bool_success();
316 }
317 
318 EGLBoolean _eglMakeCurrent(EGLDisplay dpy,
319  EGLSurface draw,
320  EGLSurface read,
321  EGLContext ctx) {
322  if (!check_display(dpy) || !check_initialized(dpy)) {
323  return EGL_FALSE;
324  }
325 
326  return bool_success();
327 }
328 
329 EGLBoolean _eglSwapBuffers(EGLDisplay dpy, EGLSurface surface) {
330  if (!check_display(dpy) || !check_initialized(dpy)) {
331  return EGL_FALSE;
332  }
333 
334  return bool_success();
335 }
336 
337 static void _glBindFramebuffer(GLenum target, GLuint framebuffer) {}
338 
339 static void _glBindTexture(GLenum target, GLuint texture) {}
340 
341 void _glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers) {}
342 
343 void _glDeleteTextures(GLsizei n, const GLuint* textures) {}
344 
345 static void _glFramebufferTexture2D(GLenum target,
346  GLenum attachment,
347  GLenum textarget,
348  GLuint texture,
349  GLint level) {}
350 
351 static void _glGenTextures(GLsizei n, GLuint* textures) {
352  for (GLsizei i = 0; i < n; i++) {
353  textures[i] = 0;
354  }
355 }
356 
357 static void _glGenFramebuffers(GLsizei n, GLuint* framebuffers) {
358  for (GLsizei i = 0; i < n; i++) {
359  framebuffers[i] = 0;
360  }
361 }
362 
363 static void _glTexParameterf(GLenum target, GLenum pname, GLfloat param) {}
364 
365 static void _glTexParameteri(GLenum target, GLenum pname, GLint param) {}
366 
367 static void _glTexImage2D(GLenum target,
368  GLint level,
369  GLint internalformat,
370  GLsizei width,
371  GLsizei height,
372  GLint border,
373  GLenum format,
374  GLenum type,
375  const void* pixels) {}
376 
377 static GLenum _glGetError() {
378  return GL_NO_ERROR;
379 }
380 
381 bool epoxy_has_gl_extension(const char* extension) {
382  return false;
383 }
384 
386  return false;
387 }
388 
389 int epoxy_gl_version(void) {
390  return 0;
391 }
392 
393 #ifdef __GNUC__
394 #define CONSTRUCT(_func) static void _func(void) __attribute__((constructor));
395 #define DESTRUCT(_func) static void _func(void) __attribute__((destructor));
396 #elif defined(_MSC_VER) && (_MSC_VER >= 1500)
397 #define CONSTRUCT(_func) \
398  static void _func(void); \
399  static int _func##_wrapper(void) { \
400  _func(); \
401  return 0; \
402  } \
403  __pragma(section(".CRT$XCU", read)) __declspec(allocate( \
404  ".CRT$XCU")) static int (*_array##_func)(void) = _func##_wrapper;
405 
406 #else
407 #error "You will need constructor support for your compiler"
408 #endif
409 
410 CONSTRUCT(library_init)
411 
412 EGLBoolean (*epoxy_eglBindAPI)(EGLenum api);
413 EGLBoolean (*epoxy_eglChooseConfig)(EGLDisplay dpy,
414  const EGLint* attrib_list,
415  EGLConfig* configs,
416  EGLint config_size,
417  EGLint* num_config);
418 EGLContext (*epoxy_eglCreateContext)(EGLDisplay dpy,
419  EGLConfig config,
420  EGLContext share_context,
421  const EGLint* attrib_list);
422 EGLSurface (*epoxy_eglCreatePbufferSurface)(EGLDisplay dpy,
423  EGLConfig config,
424  const EGLint* attrib_list);
425 EGLSurface (*epoxy_eglCreateWindowSurface)(EGLDisplay dpy,
426  EGLConfig config,
427  EGLNativeWindowType win,
428  const EGLint* attrib_list);
429 EGLBoolean (*epoxy_eglGetConfigAttrib)(EGLDisplay dpy,
430  EGLConfig config,
431  EGLint attribute,
432  EGLint* value);
433 EGLDisplay (*epoxy_eglGetDisplay)(EGLNativeDisplayType display_id);
434 EGLint (*epoxy_eglGetError)();
435 void (*(*epoxy_eglGetProcAddress)(const char* procname))(void);
436 EGLBoolean (*epoxy_eglInitialize)(EGLDisplay dpy, EGLint* major, EGLint* minor);
437 EGLBoolean (*epoxy_eglMakeCurrent)(EGLDisplay dpy,
438  EGLSurface draw,
439  EGLSurface read,
440  EGLContext ctx);
441 EGLBoolean (*epoxy_eglSwapBuffers)(EGLDisplay dpy, EGLSurface surface);
442 
443 void (*epoxy_glBindFramebuffer)(GLenum target, GLuint framebuffer);
444 void (*epoxy_glBindTexture)(GLenum target, GLuint texture);
445 void (*epoxy_glDeleteFramebuffers)(GLsizei n, const GLuint* framebuffers);
446 void (*epoxy_glDeleteTextures)(GLsizei n, const GLuint* textures);
447 void (*epoxy_glFramebufferTexture2D)(GLenum target,
448  GLenum attachment,
449  GLenum textarget,
450  GLuint texture,
451  GLint level);
452 void (*epoxy_glGenFramebuffers)(GLsizei n, GLuint* framebuffers);
453 void (*epoxy_glGenTextures)(GLsizei n, GLuint* textures);
454 void (*epoxy_glTexParameterf)(GLenum target, GLenum pname, GLfloat param);
455 void (*epoxy_glTexParameteri)(GLenum target, GLenum pname, GLint param);
456 void (*epoxy_glTexImage2D)(GLenum target,
457  GLint level,
458  GLint internalformat,
459  GLsizei width,
460  GLsizei height,
461  GLint border,
462  GLenum format,
463  GLenum type,
464  const void* pixels);
465 GLenum (*epoxy_glGetError)();
466 
467 static void library_init() {
475  epoxy_eglGetError = _eglGetError;
480 
491  epoxy_glGetError = _glGetError;
492 }
KeyCallType type
EGLint max_pbuffer_height
Definition: mock_epoxy.cc:33
EGLSurface _eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list)
Definition: mock_epoxy.cc:138
EGLBoolean(* epoxy_eglBindAPI)(EGLenum api)
Definition: mock_epoxy.cc:412
const uint8_t uint32_t uint32_t GError ** error
GLenum(* epoxy_glGetError)()
Definition: mock_epoxy.cc:465
static void _glGenTextures(GLsizei n, GLuint *textures)
Definition: mock_epoxy.cc:351
void _glDeleteFramebuffers(GLsizei n, const GLuint *framebuffers)
Definition: mock_epoxy.cc:341
bool epoxy_is_desktop_gl(void)
Definition: mock_epoxy.cc:385
EGLSurface _eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list)
Definition: mock_epoxy.cc:149
static MockContext mock_context
Definition: mock_epoxy.cc:51
static bool check_display(EGLDisplay dpy)
Definition: mock_epoxy.cc:56
EGLint surface_type
Definition: mock_epoxy.cc:31
EGLBoolean(* epoxy_eglInitialize)(EGLDisplay dpy, EGLint *major, EGLint *minor)
Definition: mock_epoxy.cc:436
EGLint green_size
Definition: mock_epoxy.cc:16
void(*(* epoxy_eglGetProcAddress)(const char *procname))(void)
Definition: mock_epoxy.cc:435
EGLint bind_to_texture_rgb
Definition: mock_epoxy.cc:27
int epoxy_gl_version(void)
Definition: mock_epoxy.cc:389
EGLint renderable_type
Definition: mock_epoxy.cc:29
static EGLBoolean bool_success()
Definition: mock_epoxy.cc:83
EGLint alpha_size
Definition: mock_epoxy.cc:18
EGLint transparent_type
Definition: mock_epoxy.cc:13
uint32_t uint32_t * format
EGLBoolean(* epoxy_eglMakeCurrent)(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx)
Definition: mock_epoxy.cc:437
static bool display_initialized
Definition: mock_epoxy.cc:48
bool epoxy_has_gl_extension(const char *extension)
Definition: mock_epoxy.cc:381
static MockConfig mock_config
Definition: mock_epoxy.cc:50
static void _glGenFramebuffers(GLsizei n, GLuint *framebuffers)
Definition: mock_epoxy.cc:357
static EGLint mock_error
Definition: mock_epoxy.cc:54
EGLBoolean _eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
Definition: mock_epoxy.cc:272
EGLBoolean _eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value)
Definition: mock_epoxy.cc:161
EGLContext _eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list)
Definition: mock_epoxy.cc:126
static bool check_initialized(EGLDisplay dpy)
Definition: mock_epoxy.cc:65
void(* epoxy_glGenTextures)(GLsizei n, GLuint *textures)
Definition: mock_epoxy.cc:453
EGLint samples
Definition: mock_epoxy.cc:21
EGLint buffer_size
Definition: mock_epoxy.cc:11
EGLSurface(* epoxy_eglCreateWindowSurface)(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list)
Definition: mock_epoxy.cc:425
EGLint conformant
Definition: mock_epoxy.cc:30
EGLint stencil_size
Definition: mock_epoxy.cc:20
static void _glTexParameterf(GLenum target, GLenum pname, GLfloat param)
Definition: mock_epoxy.cc:363
EGLBoolean _eglBindAPI(EGLenum api)
Definition: mock_epoxy.cc:93
void(* epoxy_glTexParameteri)(GLenum target, GLenum pname, GLint param)
Definition: mock_epoxy.cc:455
EGLint max_swap_interval
Definition: mock_epoxy.cc:36
EGLBoolean(* epoxy_eglGetConfigAttrib)(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value)
Definition: mock_epoxy.cc:429
static void library_init()
Definition: mock_epoxy.cc:467
uint8_t value
uint32_t * target
void(* epoxy_glDeleteFramebuffers)(GLsizei n, const GLuint *framebuffers)
Definition: mock_epoxy.cc:445
EGLint min_swap_interval
Definition: mock_epoxy.cc:35
static void _glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
Definition: mock_epoxy.cc:345
EGLint config_id
Definition: mock_epoxy.cc:10
static MockDisplay mock_display
Definition: mock_epoxy.cc:49
static void _glBindTexture(GLenum target, GLuint texture)
Definition: mock_epoxy.cc:339
void(* epoxy_glTexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels)
Definition: mock_epoxy.cc:456
int32_t width
EGLint color_buffer_type
Definition: mock_epoxy.cc:12
EGLBoolean _eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx)
Definition: mock_epoxy.cc:318
EGLBoolean(* epoxy_eglSwapBuffers)(EGLDisplay dpy, EGLSurface surface)
Definition: mock_epoxy.cc:441
void(* epoxy_glDeleteTextures)(GLsizei n, const GLuint *textures)
Definition: mock_epoxy.cc:446
int32_t height
static void _glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels)
Definition: mock_epoxy.cc:367
EGLint native_visual_id
Definition: mock_epoxy.cc:23
void _glDeleteTextures(GLsizei n, const GLuint *textures)
Definition: mock_epoxy.cc:343
void(*)(void) _eglGetProcAddress(const char *procname)
Definition: mock_epoxy.cc:267
EGLint native_renderable
Definition: mock_epoxy.cc:25
static void _glBindFramebuffer(GLenum target, GLuint framebuffer)
Definition: mock_epoxy.cc:337
EGLint(* epoxy_eglGetError)()
Definition: mock_epoxy.cc:434
static GLenum _glGetError()
Definition: mock_epoxy.cc:377
EGLBoolean _eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config)
Definition: mock_epoxy.cc:97
EGLint bind_to_texture_rgba
Definition: mock_epoxy.cc:28
EGLSurface(* epoxy_eglCreatePbufferSurface)(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list)
Definition: mock_epoxy.cc:422
static MockSurface mock_surface
Definition: mock_epoxy.cc:52
static void _glTexParameteri(GLenum target, GLenum pname, GLint param)
Definition: mock_epoxy.cc:365
EGLBoolean _eglSwapBuffers(EGLDisplay dpy, EGLSurface surface)
Definition: mock_epoxy.cc:329
EGLint red_size
Definition: mock_epoxy.cc:15
EGLint sample_buffers
Definition: mock_epoxy.cc:22
FlTexture * texture
EGLint max_pbuffer_width
Definition: mock_epoxy.cc:32
static EGLBoolean bool_failure(EGLint error)
Definition: mock_epoxy.cc:88
EGLint level
Definition: mock_epoxy.cc:14
EGLBoolean(* epoxy_eglChooseConfig)(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config)
Definition: mock_epoxy.cc:413
void(* epoxy_glGenFramebuffers)(GLsizei n, GLuint *framebuffers)
Definition: mock_epoxy.cc:452
EGLint blue_size
Definition: mock_epoxy.cc:17
EGLDisplay _eglGetDisplay(EGLNativeDisplayType display_id)
Definition: mock_epoxy.cc:257
void(* epoxy_glBindFramebuffer)(GLenum target, GLuint framebuffer)
Definition: mock_epoxy.cc:443
EGLDisplay(* epoxy_eglGetDisplay)(EGLNativeDisplayType display_id)
Definition: mock_epoxy.cc:433
EGLint native_visual_type
Definition: mock_epoxy.cc:24
EGLint max_pbuffer_pixels
Definition: mock_epoxy.cc:34
static bool check_config(EGLConfig config)
Definition: mock_epoxy.cc:74
void(* epoxy_glTexParameterf)(GLenum target, GLenum pname, GLfloat param)
Definition: mock_epoxy.cc:454
void(* epoxy_glFramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
Definition: mock_epoxy.cc:447
EGLContext(* epoxy_eglCreateContext)(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list)
Definition: mock_epoxy.cc:418
EGLint depth_size
Definition: mock_epoxy.cc:19
EGLint _eglGetError()
Definition: mock_epoxy.cc:261
void(* epoxy_glBindTexture)(GLenum target, GLuint texture)
Definition: mock_epoxy.cc:444
EGLint config_caveat
Definition: mock_epoxy.cc:26