Flutter Engine
 
Loading...
Searching...
No Matches
mock_epoxy.cc File Reference

Go to the source code of this file.

Classes

struct  MockConfig
 
struct  MockDisplay
 
struct  MockContext
 
struct  MockSurface
 
struct  MockImage
 

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)
 
EGLContext _eglGetCurrentContext ()
 
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)
 
EGLDisplay _eglGetCurrentDisplay ()
 
EGLDisplay _eglGetPlatformDisplayEXT (EGLenum platform, void *native_display, const EGLint *attrib_list)
 
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)
 
EGLImage _eglCreateImage (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list)
 
void _glAttachShader (GLuint program, GLuint shader)
 
static void _glBindFramebuffer (GLenum target, GLuint framebuffer)
 
static void _glBindRenderbuffer (GLenum target, GLuint framebuffer)
 
static void _glBindTexture (GLenum target, GLuint texture)
 
static void _glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
 
GLuint _glCreateProgram ()
 
void _glCompileShader (GLuint shader)
 
void _glClearColor (GLfloat r, GLfloat g, GLfloat b, GLfloat a)
 
GLuint _glCreateShader (GLenum shaderType)
 
void _glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers)
 
void _glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers)
 
void _glDeleteShader (GLuint shader)
 
void _glDeleteTextures (GLsizei n, const GLuint *textures)
 
static void _glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
 
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 _glGenRenderbuffers (GLsizei n, GLuint *renderbuffers)
 
static void _glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params)
 
static void _glGetIntegerv (GLenum pname, GLint *data)
 
static void _glGetProgramiv (GLuint program, GLenum pname, GLint *params)
 
static void _glGetProgramInfoLog (GLuint program, GLsizei maxLength, GLsizei *length, GLchar *infoLog)
 
static void _glGetShaderiv (GLuint shader, GLenum pname, GLint *params)
 
static void _glGetShaderInfoLog (GLuint shader, GLsizei maxLength, GLsizei *length, GLchar *infoLog)
 
static const GLubyte * _glGetString (GLenum pname)
 
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 ()
 
void _glLinkProgram (GLuint program)
 
void _glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
 
void _glShaderSource (GLuint shader, GLsizei count, const GLchar *const *string, const GLint *length)
 
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 MockEpoxymock = nullptr
 
static bool display_initialized = false
 
static MockDisplay mock_display
 
static MockConfig mock_config
 
static MockContext mock_context
 
static MockSurface mock_surface
 
static MockImage mock_image
 
static EGLint mock_error = EGL_SUCCESS
 
void(*)(void) _eglGetProcAddress (const char *procname)
 
static GLuint bound_texture_2d
 
static std::map< GLenum, GLuint > framebuffer_renderbuffers
 
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)
 
EGLDisplay(* epoxy_eglGetPlatformDisplayEXT )(EGLenum platform, void *native_display, const EGLint *attrib_list)
 
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)
 
EGLImage(* epoxy_eglCreateImage )(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list)
 
void(* epoxy_glAttachShader )(GLuint program, GLuint shader)
 
void(* epoxy_glBindFramebuffer )(GLenum target, GLuint framebuffer)
 
void(* epoxy_glBindRenderbuffer )(GLenum target, GLuint renderbuffer)
 
void(* epoxy_glBindTexture )(GLenum target, GLuint texture)
 
void(* epoxy_glBlitFramebuffer )(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
 
void(* epoxy_glCompileShader )(GLuint shader)
 
GLuint(* epoxy_glCreateProgram )()
 
GLuint(* epoxy_glCreateShader )(GLenum shaderType)
 
void(* epoxy_glDeleteFramebuffers )(GLsizei n, const GLuint *framebuffers)
 
void(* expoxy_glDeleteShader )(GLuint shader)
 
void(* epoxy_glDeleteTextures )(GLsizei n, const GLuint *textures)
 
void(* epoxy_glFramebufferRenderbuffer )(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
 
void(* epoxy_glFramebufferTexture2D )(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
 
void(* epoxy_glGetFramebufferAttachmentParameteriv )(GLenum target, GLenum attachment, GLenum pname, GLint *params)
 
void(* epoxy_glGenFramebuffers )(GLsizei n, GLuint *framebuffers)
 
void(* epoxy_glGenTextures )(GLsizei n, GLuint *textures)
 
void(* epoxy_glLinkProgram )(GLuint program)
 
void(* epoxy_glRenderbufferStorage )(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
 
void(* epoxy_glShaderSource )(GLuint shader, GLsizei count, const GLchar *const *string, const GLint *length)
 
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 110 of file mock_epoxy.cc.

110 {
111 return bool_success();
112}
static EGLBoolean bool_success()

References bool_success().

Referenced by library_init().

◆ _eglChooseConfig()

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

Definition at line 114 of file mock_epoxy.cc.

118 {
119 if (!check_display(dpy) || !check_initialized(dpy)) {
120 return EGL_FALSE;
121 }
122
123 if (configs == nullptr) {
124 if (num_config != nullptr) {
125 *num_config = 1;
126 }
127 return bool_success();
128 }
129
130 EGLint n_returned = 0;
131 if (config_size >= 1) {
132 configs[0] = &mock_config;
133 n_returned++;
134 }
135
136 if (num_config != nullptr) {
137 *num_config = n_returned;
138 }
139
140 return bool_success();
141}
static bool check_initialized(EGLDisplay dpy)
Definition mock_epoxy.cc:82
static MockConfig mock_config
Definition mock_epoxy.cc:56
static bool check_display(EGLDisplay dpy)
Definition mock_epoxy.cc:73

References bool_success(), check_display(), check_initialized(), and mock_config.

Referenced by library_init().

◆ _eglCreateContext()

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

Definition at line 143 of file mock_epoxy.cc.

146 {
147 if (!check_display(dpy) || !check_initialized(dpy) || !check_config(config)) {
148 return EGL_NO_CONTEXT;
149 }
150
151 mock_error = EGL_SUCCESS;
152 return &mock_context;
153}
static bool check_config(EGLConfig config)
Definition mock_epoxy.cc:91
static MockContext mock_context
Definition mock_epoxy.cc:57
static EGLint mock_error
Definition mock_epoxy.cc:61

References check_config(), check_display(), check_initialized(), mock_context, and mock_error.

Referenced by library_init().

◆ _eglCreateImage()

EGLImage _eglCreateImage ( EGLDisplay  dpy,
EGLContext  ctx,
EGLenum  target,
EGLClientBuffer  buffer,
const EGLAttrib *  attrib_list 
)

Definition at line 378 of file mock_epoxy.cc.

382 {
383 mock->eglCreateImage(dpy, ctx, target, buffer, attrib_list);
384 return &mock_image;
385}
uint32_t * target
static MockImage mock_image
Definition mock_epoxy.cc:59
static MockEpoxy * mock
Definition mock_epoxy.cc:53

References mock, mock_image, and target.

Referenced by library_init().

◆ _eglCreatePbufferSurface()

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

Definition at line 159 of file mock_epoxy.cc.

161 {
162 if (!check_display(dpy) || !check_initialized(dpy) || !check_config(config)) {
163 return EGL_NO_SURFACE;
164 }
165
166 mock_error = EGL_SUCCESS;
167 return &mock_surface;
168}
static MockSurface mock_surface
Definition mock_epoxy.cc:58

References check_config(), check_display(), check_initialized(), mock_error, and mock_surface.

Referenced by library_init().

◆ _eglCreateWindowSurface()

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

Definition at line 170 of file mock_epoxy.cc.

173 {
174 if (!check_display(dpy) || !check_initialized(dpy) || !check_config(config)) {
175 return EGL_NO_SURFACE;
176 }
177
178 mock_error = EGL_SUCCESS;
179 return &mock_surface;
180}

References check_config(), check_display(), check_initialized(), mock_error, and mock_surface.

Referenced by library_init().

◆ _eglGetConfigAttrib()

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

Definition at line 182 of file mock_epoxy.cc.

185 {
186 if (!check_display(dpy) || !check_initialized(dpy) || !check_config(config)) {
187 return EGL_FALSE;
188 }
189
190 MockConfig* c = static_cast<MockConfig*>(config);
191 switch (attribute) {
192 case EGL_CONFIG_ID:
193 *value = c->config_id;
194 return bool_success();
195 case EGL_BUFFER_SIZE:
196 *value = c->buffer_size;
197 return bool_success();
198 case EGL_COLOR_BUFFER_TYPE:
200 return bool_success();
201 case EGL_TRANSPARENT_TYPE:
203 return bool_success();
204 case EGL_LEVEL:
205 *value = c->level;
206 return bool_success();
207 case EGL_RED_SIZE:
208 *value = c->red_size;
209 return bool_success();
210 case EGL_GREEN_SIZE:
211 *value = c->green_size;
212 return bool_success();
213 case EGL_BLUE_SIZE:
214 *value = c->blue_size;
215 return bool_success();
216 case EGL_ALPHA_SIZE:
217 *value = c->alpha_size;
218 return bool_success();
219 case EGL_DEPTH_SIZE:
220 *value = c->depth_size;
221 return bool_success();
222 case EGL_STENCIL_SIZE:
223 *value = c->stencil_size;
224 return bool_success();
225 case EGL_SAMPLES:
226 *value = c->samples;
227 return bool_success();
228 case EGL_SAMPLE_BUFFERS:
229 *value = c->sample_buffers;
230 return bool_success();
231 case EGL_NATIVE_VISUAL_ID:
233 return bool_success();
234 case EGL_NATIVE_VISUAL_TYPE:
236 return bool_success();
237 case EGL_NATIVE_RENDERABLE:
239 return bool_success();
240 case EGL_CONFIG_CAVEAT:
241 *value = c->config_caveat;
242 return bool_success();
243 case EGL_BIND_TO_TEXTURE_RGB:
245 return bool_success();
246 case EGL_BIND_TO_TEXTURE_RGBA:
248 return bool_success();
249 case EGL_RENDERABLE_TYPE:
251 return bool_success();
252 case EGL_CONFORMANT:
253 *value = c->conformant;
254 return bool_success();
255 case EGL_SURFACE_TYPE:
256 *value = c->surface_type;
257 return bool_success();
258 case EGL_MAX_PBUFFER_WIDTH:
260 return bool_success();
261 case EGL_MAX_PBUFFER_HEIGHT:
263 return bool_success();
264 case EGL_MAX_PBUFFER_PIXELS:
266 return bool_success();
267 case EGL_MIN_SWAP_INTERVAL:
269 return bool_success();
270 case EGL_MAX_SWAP_INTERVAL:
272 return bool_success();
273 default:
274 return bool_failure(EGL_BAD_ATTRIBUTE);
275 }
276}
int32_t value
static EGLBoolean bool_failure(EGLint error)
EGLint depth_size
Definition mock_epoxy.cc:21
EGLint renderable_type
Definition mock_epoxy.cc:31
EGLint native_renderable
Definition mock_epoxy.cc:27
EGLint bind_to_texture_rgba
Definition mock_epoxy.cc:30
EGLint native_visual_type
Definition mock_epoxy.cc:26
EGLint max_pbuffer_width
Definition mock_epoxy.cc:34
EGLint conformant
Definition mock_epoxy.cc:32
EGLint green_size
Definition mock_epoxy.cc:18
EGLint config_id
Definition mock_epoxy.cc:12
EGLint buffer_size
Definition mock_epoxy.cc:13
EGLint surface_type
Definition mock_epoxy.cc:33
EGLint level
Definition mock_epoxy.cc:16
EGLint config_caveat
Definition mock_epoxy.cc:28
EGLint color_buffer_type
Definition mock_epoxy.cc:14
EGLint min_swap_interval
Definition mock_epoxy.cc:37
EGLint native_visual_id
Definition mock_epoxy.cc:25
EGLint max_pbuffer_pixels
Definition mock_epoxy.cc:36
EGLint red_size
Definition mock_epoxy.cc:17
EGLint max_pbuffer_height
Definition mock_epoxy.cc:35
EGLint sample_buffers
Definition mock_epoxy.cc:24
EGLint max_swap_interval
Definition mock_epoxy.cc:38
EGLint stencil_size
Definition mock_epoxy.cc:22
EGLint samples
Definition mock_epoxy.cc:23
EGLint blue_size
Definition mock_epoxy.cc:19
EGLint alpha_size
Definition mock_epoxy.cc:20
EGLint transparent_type
Definition mock_epoxy.cc:15
EGLint bind_to_texture_rgb
Definition mock_epoxy.cc:29

References MockConfig::alpha_size, MockConfig::bind_to_texture_rgb, MockConfig::bind_to_texture_rgba, MockConfig::blue_size, bool_failure(), bool_success(), MockConfig::buffer_size, check_config(), check_display(), check_initialized(), MockConfig::color_buffer_type, MockConfig::config_caveat, MockConfig::config_id, MockConfig::conformant, MockConfig::depth_size, MockConfig::green_size, MockConfig::level, MockConfig::max_pbuffer_height, MockConfig::max_pbuffer_pixels, MockConfig::max_pbuffer_width, MockConfig::max_swap_interval, MockConfig::min_swap_interval, MockConfig::native_renderable, MockConfig::native_visual_id, MockConfig::native_visual_type, MockConfig::red_size, MockConfig::renderable_type, MockConfig::sample_buffers, MockConfig::samples, MockConfig::stencil_size, MockConfig::surface_type, MockConfig::transparent_type, and value.

Referenced by library_init().

◆ _eglGetCurrentContext()

EGLContext _eglGetCurrentContext ( )

Definition at line 155 of file mock_epoxy.cc.

155 {
156 return &mock_context;
157}

References mock_context.

Referenced by library_init().

◆ _eglGetCurrentDisplay()

EGLDisplay _eglGetCurrentDisplay ( )

Definition at line 282 of file mock_epoxy.cc.

282 {
283 return &mock_display;
284}
static MockDisplay mock_display
Definition mock_epoxy.cc:55

References mock_display.

Referenced by library_init().

◆ _eglGetDisplay()

EGLDisplay _eglGetDisplay ( EGLNativeDisplayType  display_id)

Definition at line 278 of file mock_epoxy.cc.

278 {
279 return &mock_display;
280}

References mock_display.

Referenced by library_init().

◆ _eglGetError()

EGLint _eglGetError ( )

Definition at line 292 of file mock_epoxy.cc.

292 {
293 EGLint error = mock_error;
294 mock_error = EGL_SUCCESS;
295 return error;
296}
const uint8_t uint32_t uint32_t GError ** error

References error, and mock_error.

Referenced by library_init().

◆ _eglGetPlatformDisplayEXT()

EGLDisplay _eglGetPlatformDisplayEXT ( EGLenum  platform,
void *  native_display,
const EGLint *  attrib_list 
)

Definition at line 286 of file mock_epoxy.cc.

288 {
289 return &mock_display;
290}

References mock_display.

Referenced by library_init().

◆ _eglInitialize()

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

Definition at line 303 of file mock_epoxy.cc.

303 {
304 if (!check_display(dpy)) {
305 return EGL_FALSE;
306 }
307
308 if (!display_initialized) {
311 mock_config.color_buffer_type = EGL_RGB_BUFFER;
312 mock_config.transparent_type = EGL_NONE;
313 mock_config.level = 1;
325 mock_config.config_caveat = EGL_NONE;
328 mock_config.renderable_type = EGL_OPENGL_ES2_BIT;
329 mock_config.conformant = EGL_OPENGL_ES2_BIT;
330 mock_config.surface_type = EGL_WINDOW_BIT | EGL_PBUFFER_BIT;
333 mock_config.max_pbuffer_pixels = 1024 * 1024;
336 display_initialized = true;
337 }
338
339 if (major != nullptr) {
340 *major = 1;
341 }
342 if (minor != nullptr) {
343 *minor = 5;
344 }
345
346 return bool_success();
347}
static bool display_initialized
Definition mock_epoxy.cc:54

References MockConfig::alpha_size, MockConfig::bind_to_texture_rgb, MockConfig::bind_to_texture_rgba, MockConfig::blue_size, bool_success(), MockConfig::buffer_size, check_display(), MockConfig::color_buffer_type, MockConfig::config_caveat, MockConfig::config_id, MockConfig::conformant, MockConfig::depth_size, display_initialized, MockConfig::green_size, MockConfig::level, MockConfig::max_pbuffer_height, MockConfig::max_pbuffer_pixels, MockConfig::max_pbuffer_width, MockConfig::max_swap_interval, MockConfig::min_swap_interval, mock_config, MockConfig::native_renderable, MockConfig::native_visual_id, MockConfig::native_visual_type, MockConfig::red_size, MockConfig::renderable_type, MockConfig::sample_buffers, MockConfig::samples, MockConfig::stencil_size, MockConfig::surface_type, and MockConfig::transparent_type.

Referenced by library_init().

◆ _eglMakeCurrent()

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

Definition at line 349 of file mock_epoxy.cc.

352 {
353 if (!check_display(dpy) || !check_initialized(dpy)) {
354 return EGL_FALSE;
355 }
356
357 return bool_success();
358}

References bool_success(), check_display(), and check_initialized().

Referenced by library_init().

◆ _eglQueryContext()

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

Definition at line 359 of file mock_epoxy.cc.

362 {
363 if (attribute == EGL_CONTEXT_CLIENT_TYPE) {
364 *value = EGL_OPENGL_API;
365 return EGL_TRUE;
366 }
367 return EGL_FALSE;
368}

References value.

Referenced by library_init().

◆ _eglSwapBuffers()

EGLBoolean _eglSwapBuffers ( EGLDisplay  dpy,
EGLSurface  surface 
)

Definition at line 370 of file mock_epoxy.cc.

370 {
371 if (!check_display(dpy) || !check_initialized(dpy)) {
372 return EGL_FALSE;
373 }
374
375 return bool_success();
376}

References bool_success(), check_display(), and check_initialized().

Referenced by library_init().

◆ _glAttachShader()

void _glAttachShader ( GLuint  program,
GLuint  shader 
)

Definition at line 391 of file mock_epoxy.cc.

391{}

Referenced by library_init().

◆ _glBindFramebuffer()

static void _glBindFramebuffer ( GLenum  target,
GLuint  framebuffer 
)
static

Definition at line 393 of file mock_epoxy.cc.

393{}

Referenced by library_init().

◆ _glBindRenderbuffer()

static void _glBindRenderbuffer ( GLenum  target,
GLuint  framebuffer 
)
static

Definition at line 395 of file mock_epoxy.cc.

395{}

Referenced by library_init().

◆ _glBindTexture()

static void _glBindTexture ( GLenum  target,
GLuint  texture 
)
static

Definition at line 397 of file mock_epoxy.cc.

397 {
398 if (target == GL_TEXTURE_2D) {
400 }
401}
static GLuint bound_texture_2d
FlTexture * texture

References bound_texture_2d, target, and texture.

Referenced by library_init().

◆ _glBlitFramebuffer()

static void _glBlitFramebuffer ( GLint  srcX0,
GLint  srcY0,
GLint  srcX1,
GLint  srcY1,
GLint  dstX0,
GLint  dstY0,
GLint  dstX1,
GLint  dstY1,
GLbitfield  mask,
GLenum  filter 
)
static

Definition at line 403 of file mock_epoxy.cc.

412 {
413 mock->glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1,
414 dstY1, mask, filter);
415}

References mock.

Referenced by library_init().

◆ _glClearColor()

void _glClearColor ( GLfloat  r,
GLfloat  g,
GLfloat  b,
GLfloat  a 
)

Definition at line 423 of file mock_epoxy.cc.

423 {
424 mock->glClearColor(r, g, b, a);
425}

References mock.

Referenced by library_init().

◆ _glCompileShader()

void _glCompileShader ( GLuint  shader)

Definition at line 421 of file mock_epoxy.cc.

421{}

Referenced by library_init().

◆ _glCreateProgram()

GLuint _glCreateProgram ( )

Definition at line 417 of file mock_epoxy.cc.

417 {
418 return 0;
419}

Referenced by library_init().

◆ _glCreateShader()

GLuint _glCreateShader ( GLenum  shaderType)

Definition at line 427 of file mock_epoxy.cc.

427 {
428 return 0;
429}

Referenced by library_init().

◆ _glDeleteFramebuffers()

void _glDeleteFramebuffers ( GLsizei  n,
const GLuint *  framebuffers 
)

Definition at line 431 of file mock_epoxy.cc.

431 {
432 if (mock) {
433 mock->glDeleteFramebuffers(n, framebuffers);
434 }
435}

References mock.

Referenced by library_init().

◆ _glDeleteRenderbuffers()

void _glDeleteRenderbuffers ( GLsizei  n,
const GLuint *  renderbuffers 
)

Definition at line 437 of file mock_epoxy.cc.

437 {
438 if (mock) {
439 mock->glDeleteRenderbuffers(n, renderbuffers);
440 }
441}

References mock.

Referenced by library_init().

◆ _glDeleteShader()

void _glDeleteShader ( GLuint  shader)

Definition at line 443 of file mock_epoxy.cc.

443{}

Referenced by library_init().

◆ _glDeleteTextures()

void _glDeleteTextures ( GLsizei  n,
const GLuint *  textures 
)

Definition at line 445 of file mock_epoxy.cc.

445 {
446 if (mock) {
447 mock->glDeleteTextures(n, textures);
448 }
449}

References mock.

Referenced by library_init().

◆ _glFramebufferRenderbuffer()

static void _glFramebufferRenderbuffer ( GLenum  target,
GLenum  attachment,
GLenum  renderbuffertarget,
GLuint  renderbuffer 
)
static

Definition at line 451 of file mock_epoxy.cc.

454 {
455 framebuffer_renderbuffers[attachment] = renderbuffer;
456}
static std::map< GLenum, GLuint > framebuffer_renderbuffers

References framebuffer_renderbuffers.

Referenced by library_init().

◆ _glFramebufferTexture2D()

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

Definition at line 458 of file mock_epoxy.cc.

462 {}

Referenced by library_init().

◆ _glGenFramebuffers()

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

Definition at line 473 of file mock_epoxy.cc.

473 {
474 for (GLsizei i = 0; i < n; i++) {
475 framebuffers[i] = 0;
476 }
477 if (mock) {
478 mock->glGenFramebuffers(n, framebuffers);
479 }
480}

References i, and mock.

Referenced by library_init().

◆ _glGenRenderbuffers()

static void _glGenRenderbuffers ( GLsizei  n,
GLuint *  renderbuffers 
)
static

Definition at line 482 of file mock_epoxy.cc.

482 {
483 for (GLsizei i = 0; i < n; i++) {
484 renderbuffers[i] = 0;
485 }
486 if (mock) {
487 mock->glGenRenderbuffers(n, renderbuffers);
488 }
489}

References i, and mock.

Referenced by library_init().

◆ _glGenTextures()

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

Definition at line 464 of file mock_epoxy.cc.

464 {
465 for (GLsizei i = 0; i < n; i++) {
466 textures[i] = 0;
467 }
468 if (mock) {
469 mock->glGenTextures(n, textures);
470 }
471}

References i, and mock.

Referenced by library_init().

◆ _glGetError()

static GLenum _glGetError ( )
static

Definition at line 551 of file mock_epoxy.cc.

551 {
552 return GL_NO_ERROR;
553}

Referenced by library_init().

◆ _glGetFramebufferAttachmentParameteriv()

static void _glGetFramebufferAttachmentParameteriv ( GLenum  target,
GLenum  attachment,
GLenum  pname,
GLint *  params 
)
static

Definition at line 491 of file mock_epoxy.cc.

494 {
495 if (pname == GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE) {
496 auto it = framebuffer_renderbuffers.find(attachment);
497 *params =
498 (it != framebuffer_renderbuffers.end()) ? GL_RENDERBUFFER : GL_NONE;
499 } else if (pname == GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME) {
500 auto it = framebuffer_renderbuffers.find(attachment);
501 *params = (it != framebuffer_renderbuffers.end()) ? it->second : 0;
502 }
503}
const EmbeddedViewParams * params

References framebuffer_renderbuffers, and params.

Referenced by library_init().

◆ _glGetIntegerv()

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

Definition at line 505 of file mock_epoxy.cc.

505 {
506 if (pname == GL_TEXTURE_BINDING_2D) {
508 }
509}
std::shared_ptr< const fml::Mapping > data

References bound_texture_2d, and flutter::data.

Referenced by library_init().

◆ _glGetProgramInfoLog()

static void _glGetProgramInfoLog ( GLuint  program,
GLsizei  maxLength,
GLsizei *  length,
GLchar *  infoLog 
)
static

Definition at line 517 of file mock_epoxy.cc.

520 {}

Referenced by library_init().

◆ _glGetProgramiv()

static void _glGetProgramiv ( GLuint  program,
GLenum  pname,
GLint *  params 
)
static

Definition at line 511 of file mock_epoxy.cc.

511 {
512 if (pname == GL_LINK_STATUS) {
513 *params = GL_TRUE;
514 }
515}

References params.

Referenced by library_init().

◆ _glGetShaderInfoLog()

static void _glGetShaderInfoLog ( GLuint  shader,
GLsizei  maxLength,
GLsizei *  length,
GLchar *  infoLog 
)
static

Definition at line 528 of file mock_epoxy.cc.

531 {}

Referenced by library_init().

◆ _glGetShaderiv()

static void _glGetShaderiv ( GLuint  shader,
GLenum  pname,
GLint *  params 
)
static

Definition at line 522 of file mock_epoxy.cc.

522 {
523 if (pname == GL_COMPILE_STATUS) {
524 *params = GL_TRUE;
525 }
526}

References params.

Referenced by library_init().

◆ _glGetString()

static const GLubyte * _glGetString ( GLenum  pname)
static

Definition at line 533 of file mock_epoxy.cc.

533 {
534 return mock->glGetString(pname);
535}

References mock.

Referenced by library_init().

◆ _glLinkProgram()

void _glLinkProgram ( GLuint  program)

Definition at line 555 of file mock_epoxy.cc.

555{}

Referenced by library_init().

◆ _glRenderbufferStorage()

void _glRenderbufferStorage ( GLenum  target,
GLenum  internalformat,
GLsizei  width,
GLsizei  height 
)

Definition at line 557 of file mock_epoxy.cc.

560 {}

Referenced by library_init().

◆ _glShaderSource()

void _glShaderSource ( GLuint  shader,
GLsizei  count,
const GLchar *const *  string,
const GLint *  length 
)

Definition at line 562 of file mock_epoxy.cc.

565 {}

Referenced by library_init().

◆ _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 541 of file mock_epoxy.cc.

549 {}

Referenced by library_init().

◆ _glTexParameterf()

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

Definition at line 537 of file mock_epoxy.cc.

537{}

Referenced by library_init().

◆ _glTexParameteri()

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

Definition at line 539 of file mock_epoxy.cc.

539{}

Referenced by library_init().

◆ bool_failure()

static EGLBoolean bool_failure ( EGLint  error)
static

Definition at line 105 of file mock_epoxy.cc.

105 {
107 return EGL_FALSE;
108}

References error, and mock_error.

Referenced by _eglGetConfigAttrib().

◆ bool_success()

static EGLBoolean bool_success ( )
static

Definition at line 100 of file mock_epoxy.cc.

100 {
101 mock_error = EGL_SUCCESS;
102 return EGL_TRUE;
103}

References mock_error.

Referenced by _eglBindAPI(), _eglChooseConfig(), _eglGetConfigAttrib(), _eglInitialize(), _eglMakeCurrent(), and _eglSwapBuffers().

◆ check_config()

static bool check_config ( EGLConfig  config)
static

Definition at line 91 of file mock_epoxy.cc.

91 {
92 if (config == nullptr) {
93 mock_error = EGL_BAD_CONFIG;
94 return false;
95 }
96
97 return true;
98}

References mock_error.

Referenced by _eglCreateContext(), _eglCreatePbufferSurface(), _eglCreateWindowSurface(), and _eglGetConfigAttrib().

◆ check_display()

static bool check_display ( EGLDisplay  dpy)
static

Definition at line 73 of file mock_epoxy.cc.

73 {
74 if (dpy == nullptr) {
75 mock_error = EGL_BAD_DISPLAY;
76 return false;
77 }
78
79 return true;
80}

References mock_error.

Referenced by _eglChooseConfig(), _eglCreateContext(), _eglCreatePbufferSurface(), _eglCreateWindowSurface(), _eglGetConfigAttrib(), _eglInitialize(), _eglMakeCurrent(), and _eglSwapBuffers().

◆ check_initialized()

static bool check_initialized ( EGLDisplay  dpy)
static

Definition at line 82 of file mock_epoxy.cc.

82 {
84 mock_error = EGL_NOT_INITIALIZED;
85 return false;
86 }
87
88 return true;
89}

References display_initialized, and mock_error.

Referenced by _eglChooseConfig(), _eglCreateContext(), _eglCreatePbufferSurface(), _eglCreateWindowSurface(), _eglGetConfigAttrib(), _eglMakeCurrent(), and _eglSwapBuffers().

◆ epoxy_gl_version()

int epoxy_gl_version ( void  )

Definition at line 575 of file mock_epoxy.cc.

575 {
576 return mock->epoxy_gl_version();
577}

References mock.

Referenced by TEST(), TEST(), TEST(), TEST(), and TEST().

◆ epoxy_has_gl_extension()

bool epoxy_has_gl_extension ( const char *  extension)

Definition at line 567 of file mock_epoxy.cc.

567 {
568 return mock->epoxy_has_gl_extension(extension);
569}

References mock.

Referenced by create_opengl_backing_store(), fl_compositor_opengl_present_layers(), and TEST().

◆ epoxy_is_desktop_gl()

bool epoxy_is_desktop_gl ( void  )

Definition at line 571 of file mock_epoxy.cc.

571 {
572 return mock->epoxy_is_desktop_gl();
573}

References mock.

Referenced by TEST(), TEST(), TEST(), TEST(), and TEST().

◆ library_init()

static void library_init ( )
static

Definition at line 695 of file mock_epoxy.cc.

695 {
699 epoxy_eglGetCurrentContext = _eglGetCurrentContext;
704 epoxy_eglGetCurrentDisplay = _eglGetCurrentDisplay;
710 epoxy_eglQueryContext = _eglQueryContext;
713
720 epoxy_glClearColor = _glClearColor;
724 epoxy_glDeleteRenderbuffers = _glDeleteRenderbuffers;
725 epoxy_glDeleteShader = _glDeleteShader;
730 epoxy_glGenRenderbuffers = _glGenRenderbuffers;
734 epoxy_glGetIntegerv = _glGetIntegerv;
735 epoxy_glGetProgramiv = _glGetProgramiv;
736 epoxy_glGetProgramInfoLog = _glGetProgramInfoLog;
737 epoxy_glGetShaderiv = _glGetShaderiv;
738 epoxy_glGetShaderInfoLog = _glGetShaderInfoLog;
739 epoxy_glGetString = _glGetString;
747}
void(* epoxy_glCompileShader)(GLuint shader)
static void _glGenFramebuffers(GLsizei n, GLuint *framebuffers)
GLuint(* epoxy_glCreateProgram)()
void(* epoxy_glRenderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
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_glGetFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint *params)
void _glShaderSource(GLuint shader, GLsizei count, const GLchar *const *string, const GLint *length)
void _glClearColor(GLfloat r, GLfloat g, GLfloat b, GLfloat a)
void(* epoxy_glShaderSource)(GLuint shader, GLsizei count, const GLchar *const *string, const GLint *length)
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)
void(* epoxy_glBindRenderbuffer)(GLenum target, GLuint renderbuffer)
void _glDeleteShader(GLuint shader)
static void _glGetProgramiv(GLuint program, GLenum pname, GLint *params)
void(* epoxy_glGenFramebuffers)(GLsizei n, GLuint *framebuffers)
void(* epoxy_glAttachShader)(GLuint program, GLuint shader)
static void _glGetProgramInfoLog(GLuint program, GLsizei maxLength, GLsizei *length, GLchar *infoLog)
void(* epoxy_glTexParameteri)(GLenum target, GLenum pname, GLint param)
static void _glGenRenderbuffers(GLsizei n, GLuint *renderbuffers)
static void _glBindRenderbuffer(GLenum target, GLuint framebuffer)
EGLImage _eglCreateImage(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list)
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 _glGetShaderInfoLog(GLuint shader, GLsizei maxLength, GLsizei *length, GLchar *infoLog)
static void _glBindFramebuffer(GLenum target, GLuint framebuffer)
GLuint(* epoxy_glCreateShader)(GLenum shaderType)
static void _glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint *params)
EGLBoolean(* epoxy_eglGetConfigAttrib)(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value)
void _glDeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers)
EGLint _eglGetError()
GLuint _glCreateShader(GLenum shaderType)
void _glAttachShader(GLuint program, GLuint shader)
static const GLubyte * _glGetString(GLenum pname)
static void _glGetShaderiv(GLuint shader, GLenum pname, GLint *params)
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)
GLuint _glCreateProgram()
void(* epoxy_glGenTextures)(GLsizei n, GLuint *textures)
void _glDeleteTextures(GLsizei n, const GLuint *textures)
void(* epoxy_glBindFramebuffer)(GLenum target, GLuint framebuffer)
EGLContext _eglGetCurrentContext()
EGLSurface _eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list)
EGLSurface(* epoxy_eglCreatePbufferSurface)(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list)
void _glDeleteFramebuffers(GLsizei n, const GLuint *framebuffers)
static void _glGenTextures(GLsizei n, GLuint *textures)
void _glCompileShader(GLuint shader)
EGLDisplay(* epoxy_eglGetPlatformDisplayEXT)(EGLenum platform, void *native_display, const EGLint *attrib_list)
void(*)(void) _eglGetProcAddress(const char *procname)
void(* epoxy_glFramebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
EGLDisplay(* epoxy_eglGetDisplay)(EGLNativeDisplayType display_id)
EGLint(* epoxy_eglGetError)()
EGLImage(* epoxy_eglCreateImage)(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list)
static void _glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
static void _glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels)
void(* epoxy_glLinkProgram)(GLuint program)
GLenum(* epoxy_glGetError)()
EGLDisplay _eglGetPlatformDisplayEXT(EGLenum platform, void *native_display, const EGLint *attrib_list)
static void _glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
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)
EGLDisplay _eglGetCurrentDisplay()
EGLBoolean(* epoxy_eglChooseConfig)(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config)
void _glLinkProgram(GLuint program)
void(* epoxy_glFramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
EGLBoolean _eglSwapBuffers(EGLDisplay dpy, EGLSurface surface)
void _glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
void(* epoxy_glBlitFramebuffer)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
static GLenum _glGetError()

References _eglBindAPI(), _eglChooseConfig(), _eglCreateContext(), _eglCreateImage(), _eglCreatePbufferSurface(), _eglCreateWindowSurface(), _eglGetConfigAttrib(), _eglGetCurrentContext(), _eglGetCurrentDisplay(), _eglGetDisplay(), _eglGetError(), _eglGetPlatformDisplayEXT(), _eglGetProcAddress, _eglInitialize(), _eglMakeCurrent(), _eglQueryContext(), _eglSwapBuffers(), _glAttachShader(), _glBindFramebuffer(), _glBindRenderbuffer(), _glBindTexture(), _glBlitFramebuffer(), _glClearColor(), _glCompileShader(), _glCreateProgram(), _glCreateShader(), _glDeleteFramebuffers(), _glDeleteRenderbuffers(), _glDeleteShader(), _glDeleteTextures(), _glFramebufferRenderbuffer(), _glFramebufferTexture2D(), _glGenFramebuffers(), _glGenRenderbuffers(), _glGenTextures(), _glGetError(), _glGetFramebufferAttachmentParameteriv(), _glGetIntegerv(), _glGetProgramInfoLog(), _glGetProgramiv(), _glGetShaderInfoLog(), _glGetShaderiv(), _glGetString(), _glLinkProgram(), _glRenderbufferStorage(), _glShaderSource(), _glTexImage2D(), _glTexParameterf(), _glTexParameteri(), epoxy_eglBindAPI, epoxy_eglChooseConfig, epoxy_eglCreateContext, epoxy_eglCreateImage, epoxy_eglCreatePbufferSurface, epoxy_eglCreateWindowSurface, epoxy_eglGetConfigAttrib, epoxy_eglGetDisplay, epoxy_eglGetError, epoxy_eglGetPlatformDisplayEXT, epoxy_eglGetProcAddress, epoxy_eglInitialize, epoxy_eglMakeCurrent, epoxy_eglSwapBuffers, epoxy_glAttachShader, epoxy_glBindFramebuffer, epoxy_glBindRenderbuffer, epoxy_glBindTexture, epoxy_glBlitFramebuffer, epoxy_glCompileShader, epoxy_glCreateProgram, epoxy_glCreateShader, epoxy_glDeleteFramebuffers, epoxy_glDeleteTextures, epoxy_glFramebufferRenderbuffer, epoxy_glFramebufferTexture2D, epoxy_glGenFramebuffers, epoxy_glGenTextures, epoxy_glGetError, epoxy_glGetFramebufferAttachmentParameteriv, epoxy_glLinkProgram, epoxy_glRenderbufferStorage, epoxy_glShaderSource, epoxy_glTexImage2D, epoxy_glTexParameterf, and epoxy_glTexParameteri.

Variable Documentation

◆ _eglGetProcAddress

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

Definition at line 298 of file mock_epoxy.cc.

298 {
299 mock_error = EGL_SUCCESS;
300 return nullptr;
301}

Referenced by library_init().

◆ bound_texture_2d

GLuint bound_texture_2d
static

Definition at line 387 of file mock_epoxy.cc.

Referenced by _glBindTexture(), and _glGetIntegerv().

◆ display_initialized

bool display_initialized = false
static

Definition at line 54 of file mock_epoxy.cc.

Referenced by _eglInitialize(), and check_initialized().

◆ epoxy_eglBindAPI

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

Definition at line 599 of file mock_epoxy.cc.

Referenced by library_init().

◆ 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 600 of file mock_epoxy.cc.

Referenced by library_init().

◆ 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 605 of file mock_epoxy.cc.

Referenced by library_init().

◆ epoxy_eglCreateImage

EGLImage(* epoxy_eglCreateImage) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list) ( EGLDisplay  dpy,
EGLContext  ctx,
EGLenum  target,
EGLClientBuffer  buffer,
const EGLAttrib *  attrib_list 
)

Definition at line 632 of file mock_epoxy.cc.

Referenced by library_init().

◆ epoxy_eglCreatePbufferSurface

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

Definition at line 609 of file mock_epoxy.cc.

Referenced by library_init().

◆ 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 612 of file mock_epoxy.cc.

Referenced by library_init().

◆ epoxy_eglGetConfigAttrib

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

Definition at line 616 of file mock_epoxy.cc.

Referenced by library_init().

◆ epoxy_eglGetDisplay

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

Definition at line 620 of file mock_epoxy.cc.

Referenced by library_init().

◆ epoxy_eglGetError

EGLint(* epoxy_eglGetError) () ( )

Definition at line 624 of file mock_epoxy.cc.

Referenced by library_init().

◆ epoxy_eglGetPlatformDisplayEXT

EGLDisplay(* epoxy_eglGetPlatformDisplayEXT) (EGLenum platform, void *native_display, const EGLint *attrib_list) ( EGLenum  platform,
void *  native_display,
const EGLint *  attrib_list 
)

Definition at line 621 of file mock_epoxy.cc.

Referenced by library_init().

◆ epoxy_eglGetProcAddress

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

Definition at line 625 of file mock_epoxy.cc.

Referenced by library_init().

◆ epoxy_eglInitialize

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

Definition at line 626 of file mock_epoxy.cc.

Referenced by library_init().

◆ epoxy_eglMakeCurrent

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

Definition at line 627 of file mock_epoxy.cc.

Referenced by library_init().

◆ epoxy_eglSwapBuffers

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

Definition at line 631 of file mock_epoxy.cc.

Referenced by library_init().

◆ epoxy_glAttachShader

void(* epoxy_glAttachShader) (GLuint program, GLuint shader) ( GLuint  program,
GLuint  shader 
)

Definition at line 638 of file mock_epoxy.cc.

Referenced by library_init().

◆ epoxy_glBindFramebuffer

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

Definition at line 639 of file mock_epoxy.cc.

Referenced by library_init().

◆ epoxy_glBindRenderbuffer

void(* epoxy_glBindRenderbuffer) (GLenum target, GLuint renderbuffer) ( GLenum  target,
GLuint  renderbuffer 
)

Definition at line 640 of file mock_epoxy.cc.

Referenced by library_init().

◆ epoxy_glBindTexture

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

Definition at line 641 of file mock_epoxy.cc.

Referenced by library_init().

◆ epoxy_glBlitFramebuffer

void(* epoxy_glBlitFramebuffer) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) ( GLint  srcX0,
GLint  srcY0,
GLint  srcX1,
GLint  srcY1,
GLint  dstX0,
GLint  dstY0,
GLint  dstX1,
GLint  dstY1,
GLbitfield  mask,
GLenum  filter 
)

Definition at line 642 of file mock_epoxy.cc.

Referenced by library_init().

◆ epoxy_glCompileShader

void(* epoxy_glCompileShader) (GLuint shader) ( GLuint  shader)

Definition at line 652 of file mock_epoxy.cc.

Referenced by library_init().

◆ epoxy_glCreateProgram

GLuint(* epoxy_glCreateProgram) () ( )

Definition at line 653 of file mock_epoxy.cc.

Referenced by library_init().

◆ epoxy_glCreateShader

GLuint(* epoxy_glCreateShader) (GLenum shaderType) ( GLenum  shaderType)

Definition at line 654 of file mock_epoxy.cc.

Referenced by library_init().

◆ epoxy_glDeleteFramebuffers

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

Definition at line 655 of file mock_epoxy.cc.

Referenced by library_init().

◆ epoxy_glDeleteTextures

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

Definition at line 657 of file mock_epoxy.cc.

Referenced by library_init().

◆ epoxy_glFramebufferRenderbuffer

void(* epoxy_glFramebufferRenderbuffer) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) ( GLenum  target,
GLenum  attachment,
GLenum  renderbuffertarget,
GLuint  renderbuffer 
)

Definition at line 658 of file mock_epoxy.cc.

Referenced by library_init().

◆ 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 662 of file mock_epoxy.cc.

Referenced by library_init().

◆ epoxy_glGenFramebuffers

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

Definition at line 671 of file mock_epoxy.cc.

Referenced by library_init().

◆ epoxy_glGenTextures

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

Definition at line 672 of file mock_epoxy.cc.

Referenced by library_init().

◆ epoxy_glGetError

GLenum(* epoxy_glGetError) () ( )

Definition at line 693 of file mock_epoxy.cc.

Referenced by library_init().

◆ epoxy_glGetFramebufferAttachmentParameteriv

void(* epoxy_glGetFramebufferAttachmentParameteriv) (GLenum target, GLenum attachment, GLenum pname, GLint *params) ( GLenum  target,
GLenum  attachment,
GLenum  pname,
GLint *  params 
)

Definition at line 667 of file mock_epoxy.cc.

Referenced by library_init().

◆ epoxy_glLinkProgram

void(* epoxy_glLinkProgram) (GLuint program) ( GLuint  program)

Definition at line 673 of file mock_epoxy.cc.

Referenced by library_init().

◆ epoxy_glRenderbufferStorage

void(* epoxy_glRenderbufferStorage) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height) ( GLenum  target,
GLenum  internalformat,
GLsizei  width,
GLsizei  height 
)

Definition at line 674 of file mock_epoxy.cc.

Referenced by library_init().

◆ epoxy_glShaderSource

void(* epoxy_glShaderSource) (GLuint shader, GLsizei count, const GLchar *const *string, const GLint *length) ( GLuint  shader,
GLsizei  count,
const GLchar *const *  string,
const GLint *  length 
)

Definition at line 678 of file mock_epoxy.cc.

Referenced by library_init().

◆ 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 684 of file mock_epoxy.cc.

Referenced by library_init().

◆ epoxy_glTexParameterf

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

Definition at line 682 of file mock_epoxy.cc.

Referenced by library_init().

◆ epoxy_glTexParameteri

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

Definition at line 683 of file mock_epoxy.cc.

Referenced by library_init().

◆ expoxy_glDeleteShader

void(* expoxy_glDeleteShader) (GLuint shader) ( GLuint  shader)

Definition at line 656 of file mock_epoxy.cc.

◆ framebuffer_renderbuffers

std::map<GLenum, GLuint> framebuffer_renderbuffers
static

◆ mock

◆ mock_config

MockConfig mock_config
static

Definition at line 56 of file mock_epoxy.cc.

Referenced by _eglChooseConfig(), and _eglInitialize().

◆ mock_context

MockContext mock_context
static

Definition at line 57 of file mock_epoxy.cc.

Referenced by _eglCreateContext(), and _eglGetCurrentContext().

◆ mock_display

MockDisplay mock_display
static

Definition at line 55 of file mock_epoxy.cc.

Referenced by _eglGetCurrentDisplay(), _eglGetDisplay(), and _eglGetPlatformDisplayEXT().

◆ mock_error

◆ mock_image

MockImage mock_image
static

Definition at line 59 of file mock_epoxy.cc.

Referenced by _eglCreateImage().

◆ mock_surface

MockSurface mock_surface
static

Definition at line 58 of file mock_epoxy.cc.

Referenced by _eglCreatePbufferSurface(), and _eglCreateWindowSurface().