94 if (config ==
nullptr) {
117 const EGLint* attrib_list,
120 EGLint* num_config) {
125 if (configs ==
nullptr) {
126 if (num_config !=
nullptr) {
132 EGLint n_returned = 0;
133 if (config_size >= 1) {
138 if (num_config !=
nullptr) {
139 *num_config = n_returned;
147 EGLContext share_context,
148 const EGLint* attrib_list) {
150 return EGL_NO_CONTEXT;
163 const EGLint* attrib_list) {
165 return EGL_NO_SURFACE;
174 EGLNativeWindowType win,
175 const EGLint* attrib_list) {
177 return EGL_NO_SURFACE;
197 case EGL_BUFFER_SIZE:
200 case EGL_COLOR_BUFFER_TYPE:
201 *
value =
c->color_buffer_type;
203 case EGL_TRANSPARENT_TYPE:
204 *
value =
c->transparent_type;
224 case EGL_STENCIL_SIZE:
230 case EGL_SAMPLE_BUFFERS:
231 *
value =
c->sample_buffers;
233 case EGL_NATIVE_VISUAL_ID:
234 *
value =
c->native_visual_id;
236 case EGL_NATIVE_VISUAL_TYPE:
237 *
value =
c->native_visual_type;
239 case EGL_NATIVE_RENDERABLE:
240 *
value =
c->native_renderable;
242 case EGL_CONFIG_CAVEAT:
243 *
value =
c->config_caveat;
245 case EGL_BIND_TO_TEXTURE_RGB:
246 *
value =
c->bind_to_texture_rgb;
248 case EGL_BIND_TO_TEXTURE_RGBA:
249 *
value =
c->bind_to_texture_rgba;
251 case EGL_RENDERABLE_TYPE:
252 *
value =
c->renderable_type;
257 case EGL_SURFACE_TYPE:
260 case EGL_MAX_PBUFFER_WIDTH:
261 *
value =
c->max_pbuffer_width;
263 case EGL_MAX_PBUFFER_HEIGHT:
264 *
value =
c->max_pbuffer_height;
266 case EGL_MAX_PBUFFER_PIXELS:
267 *
value =
c->max_pbuffer_pixels;
269 case EGL_MIN_SWAP_INTERVAL:
270 *
value =
c->min_swap_interval;
272 case EGL_MAX_SWAP_INTERVAL:
273 *
value =
c->max_swap_interval;
289 void* native_display,
290 const EGLint* attrib_list) {
341 if (major !=
nullptr) {
344 if (minor !=
nullptr) {
365 if (attribute == EGL_CONTEXT_CLIENT_TYPE) {
366 *
value = EGL_OPENGL_API;
383 EGLClientBuffer buffer,
384 const EGLint* attrib_list) {
385 mock->eglCreateImageKHR(dpy, ctx,
target, buffer, attrib_list);
390 return mock->eglDestroyImageKHR(dpy,
image);
401 if (cap == GL_BLEND) {
403 }
else if (cap == GL_SCISSOR_TEST) {
415 if (
target == GL_TEXTURE_2D) {
430 mock->glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1,
431 dstY1, mask, filter);
441 mock->glClearColor(r, g, b, a);
450 mock->glDeleteFramebuffers(n, framebuffers);
456 mock->glDeleteRenderbuffers(n, renderbuffers);
464 mock->glDeleteTextures(n, textures);
478 GLenum renderbuffertarget,
479 GLuint renderbuffer) {
490 for (GLsizei
i = 0;
i < n;
i++) {
494 mock->glGenTextures(n, textures);
499 for (GLsizei
i = 0;
i < n;
i++) {
503 mock->glGenFramebuffers(n, framebuffers);
508 for (GLsizei
i = 0;
i < n;
i++) {
509 renderbuffers[
i] = 0;
512 mock->glGenRenderbuffers(n, renderbuffers);
520 if (pname == GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE) {
524 }
else if (pname == GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME) {
531 if (pname == GL_TEXTURE_BINDING_2D) {
537 if (pname == GL_LINK_STATUS) {
548 if (pname == GL_COMPILE_STATUS) {
559 return mock->glGetString(pname);
563 if (cap == GL_BLEND) {
565 }
else if (cap == GL_SCISSOR_TEST) {
578 GLint internalformat,
584 const void* pixels) {
585 if (pixels !=
nullptr) {
586 FML_CHECK(internalformat == GL_RGBA || internalformat == GL_RGBA8);
592 std::vector<uint8_t> temp(
size);
593 memcpy(temp.data(), pixels,
size);
604 GLenum internalformat,
610 const GLchar*
const*
string,
614 return mock->epoxy_has_gl_extension(extension);
618 return mock->epoxy_is_desktop_gl();
622 return mock->epoxy_gl_version();
626#define CONSTRUCT(_func) static void _func(void) __attribute__((constructor));
627#define DESTRUCT(_func) static void _func(void) __attribute__((destructor));
628#elif defined(_MSC_VER) && (_MSC_VER >= 1500)
629#define CONSTRUCT(_func) \
630 static void _func(void); \
631 static int _func##_wrapper(void) { \
635 __pragma(section(".CRT$XCU", read)) \
636 __declspec(allocate(".CRT$XCU")) static int (*_array##_func)(void) = \
640#error "You will need constructor support for your compiler"
647 const EGLint* attrib_list,
653 EGLContext share_context,
654 const EGLint* attrib_list);
657 const EGLint* attrib_list);
660 EGLNativeWindowType win,
661 const EGLint* attrib_list);
668 void* native_display,
669 const EGLint* attrib_list);
681 EGLClientBuffer buffer,
682 const EGLint* attrib_list);
707 GLenum renderbuffertarget,
708 GLuint renderbuffer);
722 GLenum internalformat,
727 const GLchar* const*
string,
733 GLint internalformat,
const EmbeddedViewParams * params
FlutterVulkanImage * image
FlFramebuffer * framebuffer
const uint8_t uint32_t uint32_t GError ** error
uint32_t uint32_t * format
#define FML_CHECK(condition)
static EGLBoolean bool_failure(EGLint error)
void(* epoxy_glCompileShader)(GLuint shader)
static void _glGenFramebuffers(GLsizei n, GLuint *framebuffers)
static bool check_config(EGLConfig config)
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)
static GLboolean enable_blend
void _glDeleteShader(GLuint shader)
void(* expoxy_glDeleteShader)(GLuint shader)
static void _glGetProgramiv(GLuint program, GLenum pname, GLint *params)
static GLuint bound_texture_2d
void(* epoxy_glGenFramebuffers)(GLsizei n, GLuint *framebuffers)
static std::map< GLenum, GLuint > framebuffer_renderbuffers
bool epoxy_has_gl_extension(const char *extension)
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)
EGLImageKHR(* epoxy_eglCreateImageKHR)(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list)
static void _glGenRenderbuffers(GLsizei n, GLuint *renderbuffers)
static void _glBindRenderbuffer(GLenum target, GLuint framebuffer)
static MockContext mock_context
static void library_init()
static void _glEnable(GLenum cap)
void(* epoxy_glTexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels)
static MockImage mock_image
static void _glTexParameteri(GLenum target, GLenum pname, GLint param)
static void _glTexParameterf(GLenum target, GLenum pname, GLfloat param)
EGLBoolean(* epoxy_eglDestroyImageKHR)(EGLDisplay dpy, EGLImage image)
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)
EGLImageKHR _eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list)
static void _glBindFramebuffer(GLenum target, GLuint framebuffer)
GLuint(* epoxy_glCreateShader)(GLenum shaderType)
static void _glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint *params)
static bool check_initialized(EGLDisplay dpy)
EGLBoolean(* epoxy_eglGetConfigAttrib)(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value)
void _glDeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers)
static GLboolean _glIsEnabled(GLenum cap)
static MockConfig mock_config
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)
static bool check_display(EGLDisplay dpy)
GLuint _glCreateProgram()
void(* epoxy_glGenTextures)(GLsizei n, GLuint *textures)
void _glDeleteTextures(GLsizei n, const GLuint *textures)
EGLBoolean _eglDestroyImageKHR(EGLDisplay dpy, EGLImage image)
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)
static bool display_initialized
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)
static GLboolean enable_scissor_test
void(* epoxy_glFramebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
EGLDisplay(* epoxy_eglGetDisplay)(EGLNativeDisplayType display_id)
EGLint(* epoxy_eglGetError)()
static EGLBoolean bool_success()
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)()
bool epoxy_is_desktop_gl(void)
EGLDisplay _eglGetPlatformDisplayEXT(EGLenum platform, void *native_display, const EGLint *attrib_list)
static void _glDisable(GLenum cap)
int epoxy_gl_version(void)
static void _glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
static void _setEnable(GLenum cap, GLboolean value)
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)
static MockDisplay mock_display
static MockSurface mock_surface
void(* epoxy_glFramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
EGLBoolean _eglSwapBuffers(EGLDisplay dpy, EGLSurface surface)
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()
it will be possible to load the file into Perfetto s trace viewer use test Running tests that layout and measure text will not yield consistent results across various platforms Enabling this option will make font resolution default to the Ahem test font on all disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot data
std::shared_ptr< ContextGLES > context
impeller::ShaderType type
EGLint bind_to_texture_rgba
EGLint native_visual_type
EGLint max_pbuffer_pixels
EGLint max_pbuffer_height
EGLint bind_to_texture_rgb