Flutter Engine
The Flutter Engine
Classes | Functions | Variables
mock_epoxy.cc File Reference
#include <epoxy/egl.h>
#include <epoxy/gl.h>

Go to the source code of this file.

Classes

struct  MockConfig
 
struct  MockDisplay
 
struct  MockContext
 
struct  MockSurface
 

Functions

static bool check_display (EGLDisplay dpy)
 
static bool check_initialized (EGLDisplay dpy)
 
static bool check_config (EGLConfig config)
 
static EGLBoolean bool_success ()
 
static EGLBoolean bool_failure (EGLint error)
 
EGLBoolean _eglBindAPI (EGLenum api)
 
EGLBoolean _eglChooseConfig (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config)
 
EGLContext _eglCreateContext (EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list)
 
EGLSurface _eglCreatePbufferSurface (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list)
 
EGLSurface _eglCreateWindowSurface (EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list)
 
EGLBoolean _eglGetConfigAttrib (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value)
 
EGLDisplay _eglGetDisplay (EGLNativeDisplayType display_id)
 
EGLint _eglGetError ()
 
EGLBoolean _eglInitialize (EGLDisplay dpy, EGLint *major, EGLint *minor)
 
EGLBoolean _eglMakeCurrent (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx)
 
EGLBoolean _eglQueryContext (EGLDisplay display, EGLContext context, EGLint attribute, EGLint *value)
 
EGLBoolean _eglSwapBuffers (EGLDisplay dpy, EGLSurface surface)
 
static void _glBindFramebuffer (GLenum target, GLuint framebuffer)
 
static void _glBindTexture (GLenum target, GLuint texture)
 
void _glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers)
 
void _glDeleteTextures (GLsizei n, const GLuint *textures)
 
static void _glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
 
static void _glGenTextures (GLsizei n, GLuint *textures)
 
static void _glGenFramebuffers (GLsizei n, GLuint *framebuffers)
 
static void _glGetIntegerv (GLenum pname, GLint *data)
 
static void _glTexParameterf (GLenum target, GLenum pname, GLfloat param)
 
static void _glTexParameteri (GLenum target, GLenum pname, GLint param)
 
static void _glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels)
 
static GLenum _glGetError ()
 
bool epoxy_has_gl_extension (const char *extension)
 
bool epoxy_is_desktop_gl (void)
 
int epoxy_gl_version (void)
 
static void library_init ()
 

Variables

static bool display_initialized = false
 
static MockDisplay mock_display
 
static MockConfig mock_config
 
static MockContext mock_context
 
static MockSurface mock_surface
 
static EGLint mock_error = EGL_SUCCESS
 
void(*)(void) _eglGetProcAddress (const char *procname)
 
static GLuint bound_texture_2d
 
EGLBoolean(* epoxy_eglBindAPI )(EGLenum api)
 
EGLBoolean(* epoxy_eglChooseConfig )(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config)
 
EGLContext(* epoxy_eglCreateContext )(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list)
 
EGLSurface(* epoxy_eglCreatePbufferSurface )(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list)
 
EGLSurface(* epoxy_eglCreateWindowSurface )(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list)
 
EGLBoolean(* epoxy_eglGetConfigAttrib )(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value)
 
EGLDisplay(* epoxy_eglGetDisplay )(EGLNativeDisplayType display_id)
 
EGLint(* epoxy_eglGetError )()
 
void(*(* epoxy_eglGetProcAddress )(const char *procname))(void)
 
EGLBoolean(* epoxy_eglInitialize )(EGLDisplay dpy, EGLint *major, EGLint *minor)
 
EGLBoolean(* epoxy_eglMakeCurrent )(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx)
 
EGLBoolean(* epoxy_eglSwapBuffers )(EGLDisplay dpy, EGLSurface surface)
 
void(* epoxy_glBindFramebuffer )(GLenum target, GLuint framebuffer)
 
void(* epoxy_glBindTexture )(GLenum target, GLuint texture)
 
void(* epoxy_glDeleteFramebuffers )(GLsizei n, const GLuint *framebuffers)
 
void(* epoxy_glDeleteTextures )(GLsizei n, const GLuint *textures)
 
void(* epoxy_glFramebufferTexture2D )(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
 
void(* epoxy_glGenFramebuffers )(GLsizei n, GLuint *framebuffers)
 
void(* epoxy_glGenTextures )(GLsizei n, GLuint *textures)
 
void(* epoxy_glTexParameterf )(GLenum target, GLenum pname, GLfloat param)
 
void(* epoxy_glTexParameteri )(GLenum target, GLenum pname, GLint param)
 
void(* epoxy_glTexImage2D )(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels)
 
GLenum(* epoxy_glGetError )()
 

Function Documentation

◆ _eglBindAPI()

EGLBoolean _eglBindAPI ( EGLenum  api)

Definition at line 93 of file mock_epoxy.cc.

93 {
94 return bool_success();
95}
static EGLBoolean bool_success()
Definition: mock_epoxy.cc:83

◆ _eglChooseConfig()

EGLBoolean _eglChooseConfig ( EGLDisplay  dpy,
const EGLint *  attrib_list,
EGLConfig *  configs,
EGLint  config_size,
EGLint *  num_config 
)

Definition at line 97 of file mock_epoxy.cc.

101 {
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}
static bool check_initialized(EGLDisplay dpy)
Definition: mock_epoxy.cc:65
static MockConfig mock_config
Definition: mock_epoxy.cc:50
static bool check_display(EGLDisplay dpy)
Definition: mock_epoxy.cc:56

◆ _eglCreateContext()

EGLContext _eglCreateContext ( EGLDisplay  dpy,
EGLConfig  config,
EGLContext  share_context,
const EGLint *  attrib_list 
)

Definition at line 126 of file mock_epoxy.cc.

129 {
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}
static bool check_config(EGLConfig config)
Definition: mock_epoxy.cc:74
static MockContext mock_context
Definition: mock_epoxy.cc:51
static EGLint mock_error
Definition: mock_epoxy.cc:54

◆ _eglCreatePbufferSurface()

EGLSurface _eglCreatePbufferSurface ( EGLDisplay  dpy,
EGLConfig  config,
const EGLint *  attrib_list 
)

Definition at line 138 of file mock_epoxy.cc.

140 {
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}
static MockSurface mock_surface
Definition: mock_epoxy.cc:52

◆ _eglCreateWindowSurface()

EGLSurface _eglCreateWindowSurface ( EGLDisplay  dpy,
EGLConfig  config,
EGLNativeWindowType  win,
const EGLint *  attrib_list 
)

Definition at line 149 of file mock_epoxy.cc.

152 {
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}

◆ _eglGetConfigAttrib()

EGLBoolean _eglGetConfigAttrib ( EGLDisplay  dpy,
EGLConfig  config,
EGLint  attribute,
EGLint *  value 
)

Definition at line 161 of file mock_epoxy.cc.

164 {
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:
179 return bool_success();
180 case EGL_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:
212 return bool_success();
213 case EGL_NATIVE_VISUAL_TYPE:
215 return bool_success();
216 case EGL_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:
224 return bool_success();
225 case EGL_BIND_TO_TEXTURE_RGBA:
227 return bool_success();
228 case EGL_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:
239 return bool_success();
240 case EGL_MAX_PBUFFER_HEIGHT:
242 return bool_success();
243 case EGL_MAX_PBUFFER_PIXELS:
245 return bool_success();
246 case EGL_MIN_SWAP_INTERVAL:
248 return bool_success();
249 case EGL_MAX_SWAP_INTERVAL:
251 return bool_success();
252 default:
253 return bool_failure(EGL_BAD_ATTRIBUTE);
254 }
255}
uint8_t value
static EGLBoolean bool_failure(EGLint error)
Definition: mock_epoxy.cc:88
EGLint depth_size
Definition: mock_epoxy.cc:19
EGLint renderable_type
Definition: mock_epoxy.cc:29
EGLint native_renderable
Definition: mock_epoxy.cc:25
EGLint bind_to_texture_rgba
Definition: mock_epoxy.cc:28
EGLint native_visual_type
Definition: mock_epoxy.cc:24
EGLint max_pbuffer_width
Definition: mock_epoxy.cc:32
EGLint conformant
Definition: mock_epoxy.cc:30
EGLint green_size
Definition: mock_epoxy.cc:16
EGLint config_id
Definition: mock_epoxy.cc:10
EGLint buffer_size
Definition: mock_epoxy.cc:11
EGLint surface_type
Definition: mock_epoxy.cc:31
EGLint level
Definition: mock_epoxy.cc:14
EGLint config_caveat
Definition: mock_epoxy.cc:26
EGLint color_buffer_type
Definition: mock_epoxy.cc:12
EGLint min_swap_interval
Definition: mock_epoxy.cc:35
EGLint native_visual_id
Definition: mock_epoxy.cc:23
EGLint max_pbuffer_pixels
Definition: mock_epoxy.cc:34
EGLint red_size
Definition: mock_epoxy.cc:15
EGLint max_pbuffer_height
Definition: mock_epoxy.cc:33
EGLint sample_buffers
Definition: mock_epoxy.cc:22
EGLint max_swap_interval
Definition: mock_epoxy.cc:36
EGLint stencil_size
Definition: mock_epoxy.cc:20
EGLint samples
Definition: mock_epoxy.cc:21
EGLint blue_size
Definition: mock_epoxy.cc:17
EGLint alpha_size
Definition: mock_epoxy.cc:18
EGLint transparent_type
Definition: mock_epoxy.cc:13
EGLint bind_to_texture_rgb
Definition: mock_epoxy.cc:27

◆ _eglGetDisplay()

EGLDisplay _eglGetDisplay ( EGLNativeDisplayType  display_id)

Definition at line 257 of file mock_epoxy.cc.

257 {
258 return &mock_display;
259}
static MockDisplay mock_display
Definition: mock_epoxy.cc:49

◆ _eglGetError()

EGLint _eglGetError ( )

Definition at line 261 of file mock_epoxy.cc.

261 {
262 EGLint error = mock_error;
263 mock_error = EGL_SUCCESS;
264 return error;
265}
const uint8_t uint32_t uint32_t GError ** error

◆ _eglInitialize()

EGLBoolean _eglInitialize ( EGLDisplay  dpy,
EGLint *  major,
EGLint *  minor 
)

Definition at line 272 of file mock_epoxy.cc.

272 {
273 if (!check_display(dpy)) {
274 return EGL_FALSE;
275 }
276
277 if (!display_initialized) {
280 mock_config.color_buffer_type = EGL_RGB_BUFFER;
281 mock_config.transparent_type = EGL_NONE;
282 mock_config.level = 1;
294 mock_config.config_caveat = EGL_NONE;
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;
302 mock_config.max_pbuffer_pixels = 1024 * 1024;
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}
static bool display_initialized
Definition: mock_epoxy.cc:48

◆ _eglMakeCurrent()

EGLBoolean _eglMakeCurrent ( EGLDisplay  dpy,
EGLSurface  draw,
EGLSurface  read,
EGLContext  ctx 
)

Definition at line 318 of file mock_epoxy.cc.

321 {
322 if (!check_display(dpy) || !check_initialized(dpy)) {
323 return EGL_FALSE;
324 }
325
326 return bool_success();
327}

◆ _eglQueryContext()

EGLBoolean _eglQueryContext ( EGLDisplay  display,
EGLContext  context,
EGLint  attribute,
EGLint *  value 
)

Definition at line 328 of file mock_epoxy.cc.

331 {
332 if (attribute == EGL_CONTEXT_CLIENT_TYPE) {
333 *value = EGL_OPENGL_API;
334 return EGL_TRUE;
335 }
336 return EGL_FALSE;
337}

◆ _eglSwapBuffers()

EGLBoolean _eglSwapBuffers ( EGLDisplay  dpy,
EGLSurface  surface 
)

Definition at line 339 of file mock_epoxy.cc.

339 {
340 if (!check_display(dpy) || !check_initialized(dpy)) {
341 return EGL_FALSE;
342 }
343
344 return bool_success();
345}

◆ _glBindFramebuffer()

static void _glBindFramebuffer ( GLenum  target,
GLuint  framebuffer 
)
static

Definition at line 349 of file mock_epoxy.cc.

349{}

◆ _glBindTexture()

static void _glBindTexture ( GLenum  target,
GLuint  texture 
)
static

Definition at line 351 of file mock_epoxy.cc.

351 {
352 if (target == GL_TEXTURE_2D) {
354 }
355}
uint32_t * target
static GLuint bound_texture_2d
Definition: mock_epoxy.cc:347
FlTexture * texture

◆ _glDeleteFramebuffers()

void _glDeleteFramebuffers ( GLsizei  n,
const GLuint *  framebuffers 
)

Definition at line 357 of file mock_epoxy.cc.

357{}

◆ _glDeleteTextures()

void _glDeleteTextures ( GLsizei  n,
const GLuint *  textures 
)

Definition at line 359 of file mock_epoxy.cc.

359{}

◆ _glFramebufferTexture2D()

static void _glFramebufferTexture2D ( GLenum  target,
GLenum  attachment,
GLenum  textarget,
GLuint  texture,
GLint  level 
)
static

Definition at line 361 of file mock_epoxy.cc.

365 {}

◆ _glGenFramebuffers()

static void _glGenFramebuffers ( GLsizei  n,
GLuint *  framebuffers 
)
static

Definition at line 373 of file mock_epoxy.cc.

373 {
374 for (GLsizei i = 0; i < n; i++) {
375 framebuffers[i] = 0;
376 }
377}

◆ _glGenTextures()

static void _glGenTextures ( GLsizei  n,
GLuint *  textures 
)
static

Definition at line 367 of file mock_epoxy.cc.

367 {
368 for (GLsizei i = 0; i < n; i++) {
369 textures[i] = 0;
370 }
371}

◆ _glGetError()

static GLenum _glGetError ( )
static

Definition at line 399 of file mock_epoxy.cc.

399 {
400 return GL_NO_ERROR;
401}

◆ _glGetIntegerv()

static void _glGetIntegerv ( GLenum  pname,
GLint *  data 
)
static

Definition at line 379 of file mock_epoxy.cc.

379 {
380 if (pname == GL_TEXTURE_BINDING_2D) {
382 }
383}
std::shared_ptr< const fml::Mapping > data
Definition: texture_gles.cc:63

◆ _glTexImage2D()

static void _glTexImage2D ( GLenum  target,
GLint  level,
GLint  internalformat,
GLsizei  width,
GLsizei  height,
GLint  border,
GLenum  format,
GLenum  type,
const void *  pixels 
)
static

Definition at line 389 of file mock_epoxy.cc.

397 {}

◆ _glTexParameterf()

static void _glTexParameterf ( GLenum  target,
GLenum  pname,
GLfloat  param 
)
static

Definition at line 385 of file mock_epoxy.cc.

385{}

◆ _glTexParameteri()

static void _glTexParameteri ( GLenum  target,
GLenum  pname,
GLint  param 
)
static

Definition at line 387 of file mock_epoxy.cc.

387{}

◆ bool_failure()

static EGLBoolean bool_failure ( EGLint  error)
static

Definition at line 88 of file mock_epoxy.cc.

88 {
90 return EGL_FALSE;
91}

◆ bool_success()

static EGLBoolean bool_success ( )
static

Definition at line 83 of file mock_epoxy.cc.

83 {
84 mock_error = EGL_SUCCESS;
85 return EGL_TRUE;
86}

◆ check_config()

static bool check_config ( EGLConfig  config)
static

Definition at line 74 of file mock_epoxy.cc.

74 {
75 if (config == nullptr) {
76 mock_error = EGL_BAD_CONFIG;
77 return false;
78 }
79
80 return true;
81}

◆ check_display()

static bool check_display ( EGLDisplay  dpy)
static

Definition at line 56 of file mock_epoxy.cc.

56 {
57 if (dpy == nullptr) {
58 mock_error = EGL_BAD_DISPLAY;
59 return false;
60 }
61
62 return true;
63}

◆ check_initialized()

static bool check_initialized ( EGLDisplay  dpy)
static

Definition at line 65 of file mock_epoxy.cc.

65 {
67 mock_error = EGL_NOT_INITIALIZED;
68 return false;
69 }
70
71 return true;
72}

◆ epoxy_gl_version()

int epoxy_gl_version ( void  )

Definition at line 411 of file mock_epoxy.cc.

411 {
412 return 0;
413}

◆ epoxy_has_gl_extension()

bool epoxy_has_gl_extension ( const char *  extension)

Definition at line 403 of file mock_epoxy.cc.

403 {
404 return false;
405}

◆ epoxy_is_desktop_gl()

bool epoxy_is_desktop_gl ( void  )

Definition at line 407 of file mock_epoxy.cc.

407 {
408 return false;
409}

◆ library_init()

static void library_init ( )
static

Definition at line 490 of file mock_epoxy.cc.

490 {
502 epoxy_eglQueryContext = _eglQueryContext;
504
512 epoxy_glGetIntegerv = _glGetIntegerv;
517}
static void _glGenFramebuffers(GLsizei n, GLuint *framebuffers)
Definition: mock_epoxy.cc:373
void(* epoxy_glBindTexture)(GLenum target, GLuint texture)
Definition: mock_epoxy.cc:467
EGLBoolean _eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value)
Definition: mock_epoxy.cc:161
EGLSurface(* epoxy_eglCreateWindowSurface)(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list)
Definition: mock_epoxy.cc:448
EGLBoolean _eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config)
Definition: mock_epoxy.cc:97
void(* epoxy_glDeleteTextures)(GLsizei n, const GLuint *textures)
Definition: mock_epoxy.cc:469
EGLBoolean _eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
Definition: mock_epoxy.cc:272
static void _glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
Definition: mock_epoxy.cc:361
EGLBoolean _eglQueryContext(EGLDisplay display, EGLContext context, EGLint attribute, EGLint *value)
Definition: mock_epoxy.cc:328
void(* epoxy_glGenFramebuffers)(GLsizei n, GLuint *framebuffers)
Definition: mock_epoxy.cc:475
void(* epoxy_glTexParameteri)(GLenum target, GLenum pname, GLint param)
Definition: mock_epoxy.cc:478
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:479
static void _glTexParameteri(GLenum target, GLenum pname, GLint param)
Definition: mock_epoxy.cc:387
static void _glTexParameterf(GLenum target, GLenum pname, GLfloat param)
Definition: mock_epoxy.cc:385
void(*(* epoxy_eglGetProcAddress)(const char *procname))(void)
Definition: mock_epoxy.cc:458
EGLSurface _eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list)
Definition: mock_epoxy.cc:149
EGLBoolean _eglBindAPI(EGLenum api)
Definition: mock_epoxy.cc:93
EGLContext(* epoxy_eglCreateContext)(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list)
Definition: mock_epoxy.cc:441
static void _glBindFramebuffer(GLenum target, GLuint framebuffer)
Definition: mock_epoxy.cc:349
EGLBoolean(* epoxy_eglGetConfigAttrib)(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value)
Definition: mock_epoxy.cc:452
EGLint _eglGetError()
Definition: mock_epoxy.cc:261
void(* epoxy_glDeleteFramebuffers)(GLsizei n, const GLuint *framebuffers)
Definition: mock_epoxy.cc:468
void(* epoxy_glTexParameterf)(GLenum target, GLenum pname, GLfloat param)
Definition: mock_epoxy.cc:477
EGLBoolean(* epoxy_eglInitialize)(EGLDisplay dpy, EGLint *major, EGLint *minor)
Definition: mock_epoxy.cc:459
static void _glBindTexture(GLenum target, GLuint texture)
Definition: mock_epoxy.cc:351
EGLDisplay _eglGetDisplay(EGLNativeDisplayType display_id)
Definition: mock_epoxy.cc:257
void(* epoxy_glGenTextures)(GLsizei n, GLuint *textures)
Definition: mock_epoxy.cc:476
void _glDeleteTextures(GLsizei n, const GLuint *textures)
Definition: mock_epoxy.cc:359
void(* epoxy_glBindFramebuffer)(GLenum target, GLuint framebuffer)
Definition: mock_epoxy.cc:466
EGLSurface _eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list)
Definition: mock_epoxy.cc:138
EGLSurface(* epoxy_eglCreatePbufferSurface)(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list)
Definition: mock_epoxy.cc:445
void _glDeleteFramebuffers(GLsizei n, const GLuint *framebuffers)
Definition: mock_epoxy.cc:357
static void _glGenTextures(GLsizei n, GLuint *textures)
Definition: mock_epoxy.cc:367
void(*)(void) _eglGetProcAddress(const char *procname)
Definition: mock_epoxy.cc:267
EGLDisplay(* epoxy_eglGetDisplay)(EGLNativeDisplayType display_id)
Definition: mock_epoxy.cc:456
EGLint(* epoxy_eglGetError)()
Definition: mock_epoxy.cc:457
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:389
GLenum(* epoxy_glGetError)()
Definition: mock_epoxy.cc:488
EGLBoolean(* epoxy_eglSwapBuffers)(EGLDisplay dpy, EGLSurface surface)
Definition: mock_epoxy.cc:464
EGLContext _eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list)
Definition: mock_epoxy.cc:126
EGLBoolean _eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx)
Definition: mock_epoxy.cc:318
EGLBoolean(* epoxy_eglMakeCurrent)(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx)
Definition: mock_epoxy.cc:460
EGLBoolean(* epoxy_eglBindAPI)(EGLenum api)
Definition: mock_epoxy.cc:435
static void _glGetIntegerv(GLenum pname, GLint *data)
Definition: mock_epoxy.cc:379
EGLBoolean(* epoxy_eglChooseConfig)(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config)
Definition: mock_epoxy.cc:436
void(* epoxy_glFramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
Definition: mock_epoxy.cc:470
EGLBoolean _eglSwapBuffers(EGLDisplay dpy, EGLSurface surface)
Definition: mock_epoxy.cc:339
static GLenum _glGetError()
Definition: mock_epoxy.cc:399

Variable Documentation

◆ _eglGetProcAddress

void(*)(void) _eglGetProcAddress(const char *procname) ( const char *  procname)

Definition at line 267 of file mock_epoxy.cc.

267 {
268 mock_error = EGL_SUCCESS;
269 return nullptr;
270}

◆ bound_texture_2d

GLuint bound_texture_2d
static

Definition at line 347 of file mock_epoxy.cc.

◆ display_initialized

bool display_initialized = false
static

Definition at line 48 of file mock_epoxy.cc.

◆ epoxy_eglBindAPI

EGLBoolean(* epoxy_eglBindAPI) (EGLenum api) ( EGLenum  api)

Definition at line 435 of file mock_epoxy.cc.

◆ epoxy_eglChooseConfig

EGLBoolean(* epoxy_eglChooseConfig) (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config) ( EGLDisplay  dpy,
const EGLint *  attrib_list,
EGLConfig *  configs,
EGLint  config_size,
EGLint *  num_config 
)

Definition at line 436 of file mock_epoxy.cc.

◆ epoxy_eglCreateContext

EGLContext(* epoxy_eglCreateContext) (EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list) ( EGLDisplay  dpy,
EGLConfig  config,
EGLContext  share_context,
const EGLint *  attrib_list 
)

Definition at line 441 of file mock_epoxy.cc.

◆ epoxy_eglCreatePbufferSurface

EGLSurface(* epoxy_eglCreatePbufferSurface) (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list) ( EGLDisplay  dpy,
EGLConfig  config,
const EGLint *  attrib_list 
)

Definition at line 445 of file mock_epoxy.cc.

◆ epoxy_eglCreateWindowSurface

EGLSurface(* epoxy_eglCreateWindowSurface) (EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list) ( EGLDisplay  dpy,
EGLConfig  config,
EGLNativeWindowType  win,
const EGLint *  attrib_list 
)

Definition at line 448 of file mock_epoxy.cc.

◆ epoxy_eglGetConfigAttrib

EGLBoolean(* epoxy_eglGetConfigAttrib) (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value) ( EGLDisplay  dpy,
EGLConfig  config,
EGLint  attribute,
EGLint *  value 
)

Definition at line 452 of file mock_epoxy.cc.

◆ epoxy_eglGetDisplay

EGLDisplay(* epoxy_eglGetDisplay) (EGLNativeDisplayType display_id) ( EGLNativeDisplayType  display_id)

Definition at line 456 of file mock_epoxy.cc.

◆ epoxy_eglGetError

EGLint(* epoxy_eglGetError) () ( )

Definition at line 457 of file mock_epoxy.cc.

◆ epoxy_eglGetProcAddress

void(*(* epoxy_eglGetProcAddress) (const char *procname))(void) ( const char *  procname)

Definition at line 458 of file mock_epoxy.cc.

◆ epoxy_eglInitialize

EGLBoolean(* epoxy_eglInitialize) (EGLDisplay dpy, EGLint *major, EGLint *minor) ( EGLDisplay  dpy,
EGLint *  major,
EGLint *  minor 
)

Definition at line 459 of file mock_epoxy.cc.

◆ epoxy_eglMakeCurrent

EGLBoolean(* epoxy_eglMakeCurrent) (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx) ( EGLDisplay  dpy,
EGLSurface  draw,
EGLSurface  read,
EGLContext  ctx 
)

Definition at line 460 of file mock_epoxy.cc.

◆ epoxy_eglSwapBuffers

EGLBoolean(* epoxy_eglSwapBuffers) (EGLDisplay dpy, EGLSurface surface) ( EGLDisplay  dpy,
EGLSurface  surface 
)

Definition at line 464 of file mock_epoxy.cc.

◆ epoxy_glBindFramebuffer

void(* epoxy_glBindFramebuffer) (GLenum target, GLuint framebuffer) ( GLenum  target,
GLuint  framebuffer 
)

Definition at line 466 of file mock_epoxy.cc.

◆ epoxy_glBindTexture

void(* epoxy_glBindTexture) (GLenum target, GLuint texture) ( GLenum  target,
GLuint  texture 
)

Definition at line 467 of file mock_epoxy.cc.

◆ epoxy_glDeleteFramebuffers

void(* epoxy_glDeleteFramebuffers) (GLsizei n, const GLuint *framebuffers) ( GLsizei  n,
const GLuint *  framebuffers 
)

Definition at line 468 of file mock_epoxy.cc.

◆ epoxy_glDeleteTextures

void(* epoxy_glDeleteTextures) (GLsizei n, const GLuint *textures) ( GLsizei  n,
const GLuint *  textures 
)

Definition at line 469 of file mock_epoxy.cc.

◆ epoxy_glFramebufferTexture2D

void(* epoxy_glFramebufferTexture2D) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) ( GLenum  target,
GLenum  attachment,
GLenum  textarget,
GLuint  texture,
GLint  level 
)

Definition at line 470 of file mock_epoxy.cc.

◆ epoxy_glGenFramebuffers

void(* epoxy_glGenFramebuffers) (GLsizei n, GLuint *framebuffers) ( GLsizei  n,
GLuint *  framebuffers 
)

Definition at line 475 of file mock_epoxy.cc.

◆ epoxy_glGenTextures

void(* epoxy_glGenTextures) (GLsizei n, GLuint *textures) ( GLsizei  n,
GLuint *  textures 
)

Definition at line 476 of file mock_epoxy.cc.

◆ epoxy_glGetError

GLenum(* epoxy_glGetError) () ( )

Definition at line 488 of file mock_epoxy.cc.

◆ epoxy_glTexImage2D

void(* epoxy_glTexImage2D) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels) ( GLenum  target,
GLint  level,
GLint  internalformat,
GLsizei  width,
GLsizei  height,
GLint  border,
GLenum  format,
GLenum  type,
const void *  pixels 
)

Definition at line 479 of file mock_epoxy.cc.

◆ epoxy_glTexParameterf

void(* epoxy_glTexParameterf) (GLenum target, GLenum pname, GLfloat param) ( GLenum  target,
GLenum  pname,
GLfloat  param 
)

Definition at line 477 of file mock_epoxy.cc.

◆ epoxy_glTexParameteri

void(* epoxy_glTexParameteri) (GLenum target, GLenum pname, GLint param) ( GLenum  target,
GLenum  pname,
GLint  param 
)

Definition at line 478 of file mock_epoxy.cc.

◆ mock_config

MockConfig mock_config
static

Definition at line 50 of file mock_epoxy.cc.

◆ mock_context

MockContext mock_context
static

Definition at line 51 of file mock_epoxy.cc.

◆ mock_display

MockDisplay mock_display
static

Definition at line 49 of file mock_epoxy.cc.

◆ mock_error

EGLint mock_error = EGL_SUCCESS
static

Definition at line 54 of file mock_epoxy.cc.

◆ mock_surface

MockSurface mock_surface
static

Definition at line 52 of file mock_epoxy.cc.