#include "anglebase/no_destructor.h"
#include "common/system_utils.h"
#include <memory>
#if defined(ANGLE_USE_EGL_LOADER)
# include "libEGL/egl_loader_autogen.h"
#else
# include "libGLESv2/entry_points_egl_autogen.h"
# include "libGLESv2/entry_points_egl_ext_autogen.h"
#endif
namespace
{
#if defined(ANGLE_USE_EGL_LOADER)
bool gLoaded = …;
void *gEntryPointsLib = …;
GenericProc KHRONOS_APIENTRY GlobalLoad(const char *symbol)
{ … }
void EnsureEGLLoaded()
{ … }
#else
void EnsureEGLLoaded() {}
#endif
}
extern "C" {
EGLBoolean EGLAPIENTRY eglChooseConfig(EGLDisplay dpy,
const EGLint *attrib_list,
EGLConfig *configs,
EGLint config_size,
EGLint *num_config)
{ … }
EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay dpy,
EGLSurface surface,
EGLNativePixmapType target)
{ … }
EGLContext EGLAPIENTRY eglCreateContext(EGLDisplay dpy,
EGLConfig config,
EGLContext share_context,
const EGLint *attrib_list)
{ … }
EGLSurface EGLAPIENTRY eglCreatePbufferSurface(EGLDisplay dpy,
EGLConfig config,
const EGLint *attrib_list)
{ … }
EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay dpy,
EGLConfig config,
EGLNativePixmapType pixmap,
const EGLint *attrib_list)
{ … }
EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy,
EGLConfig config,
EGLNativeWindowType win,
const EGLint *attrib_list)
{ … }
EGLBoolean EGLAPIENTRY eglDestroyContext(EGLDisplay dpy, EGLContext ctx)
{ … }
EGLBoolean EGLAPIENTRY eglDestroySurface(EGLDisplay dpy, EGLSurface surface)
{ … }
EGLBoolean EGLAPIENTRY eglGetConfigAttrib(EGLDisplay dpy,
EGLConfig config,
EGLint attribute,
EGLint *value)
{ … }
EGLBoolean EGLAPIENTRY eglGetConfigs(EGLDisplay dpy,
EGLConfig *configs,
EGLint config_size,
EGLint *num_config)
{ … }
EGLDisplay EGLAPIENTRY eglGetCurrentDisplay()
{ … }
EGLSurface EGLAPIENTRY eglGetCurrentSurface(EGLint readdraw)
{ … }
EGLDisplay EGLAPIENTRY eglGetDisplay(EGLNativeDisplayType display_id)
{ … }
EGLint EGLAPIENTRY eglGetError()
{ … }
__eglMustCastToProperFunctionPointerType EGLAPIENTRY eglGetProcAddress(const char *procname)
{ … }
EGLBoolean EGLAPIENTRY eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
{ … }
EGLBoolean EGLAPIENTRY eglMakeCurrent(EGLDisplay dpy,
EGLSurface draw,
EGLSurface read,
EGLContext ctx)
{ … }
EGLBoolean EGLAPIENTRY eglQueryContext(EGLDisplay dpy,
EGLContext ctx,
EGLint attribute,
EGLint *value)
{ … }
const char *EGLAPIENTRY eglQueryString(EGLDisplay dpy, EGLint name)
{ … }
EGLBoolean EGLAPIENTRY eglQuerySurface(EGLDisplay dpy,
EGLSurface surface,
EGLint attribute,
EGLint *value)
{ … }
EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surface)
{ … }
EGLBoolean EGLAPIENTRY eglTerminate(EGLDisplay dpy)
{ … }
EGLBoolean EGLAPIENTRY eglWaitGL()
{ … }
EGLBoolean EGLAPIENTRY eglWaitNative(EGLint engine)
{ … }
EGLBoolean EGLAPIENTRY eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer)
{ … }
EGLBoolean EGLAPIENTRY eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer)
{ … }
EGLBoolean EGLAPIENTRY eglSurfaceAttrib(EGLDisplay dpy,
EGLSurface surface,
EGLint attribute,
EGLint value)
{ … }
EGLBoolean EGLAPIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval)
{ … }
EGLBoolean EGLAPIENTRY eglBindAPI(EGLenum api)
{ … }
EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer(EGLDisplay dpy,
EGLenum buftype,
EGLClientBuffer buffer,
EGLConfig config,
const EGLint *attrib_list)
{ … }
EGLenum EGLAPIENTRY eglQueryAPI()
{ … }
EGLBoolean EGLAPIENTRY eglReleaseThread()
{ … }
EGLBoolean EGLAPIENTRY eglWaitClient()
{ … }
EGLContext EGLAPIENTRY eglGetCurrentContext()
{ … }
EGLint EGLAPIENTRY eglClientWaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout)
{ … }
EGLImage EGLAPIENTRY eglCreateImage(EGLDisplay dpy,
EGLContext ctx,
EGLenum target,
EGLClientBuffer buffer,
const EGLAttrib *attrib_list)
{ … }
EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurface(EGLDisplay dpy,
EGLConfig config,
void *native_pixmap,
const EGLAttrib *attrib_list)
{ … }
EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurface(EGLDisplay dpy,
EGLConfig config,
void *native_window,
const EGLAttrib *attrib_list)
{ … }
EGLSync EGLAPIENTRY eglCreateSync(EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list)
{ … }
EGLBoolean EGLAPIENTRY eglDestroyImage(EGLDisplay dpy, EGLImage image)
{ … }
EGLBoolean EGLAPIENTRY eglDestroySync(EGLDisplay dpy, EGLSync sync)
{ … }
EGLDisplay EGLAPIENTRY eglGetPlatformDisplay(EGLenum platform,
void *native_display,
const EGLAttrib *attrib_list)
{ … }
EGLBoolean EGLAPIENTRY eglGetSyncAttrib(EGLDisplay dpy,
EGLSync sync,
EGLint attribute,
EGLAttrib *value)
{ … }
EGLBoolean EGLAPIENTRY eglWaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags)
{ … }
void EGLAPIENTRY eglSetBlobCacheFuncsANDROID(EGLDisplay dpy,
EGLSetBlobFuncANDROID set,
EGLGetBlobFuncANDROID get)
{ … }
EGLClientBuffer EGLAPIENTRY eglCreateNativeClientBufferANDROID(const EGLint *attrib_list)
{ … }
EGLBoolean EGLAPIENTRY eglGetCompositorTimingSupportedANDROID(EGLDisplay dpy,
EGLSurface surface,
EGLint name)
{ … }
EGLBoolean EGLAPIENTRY eglGetCompositorTimingANDROID(EGLDisplay dpy,
EGLSurface surface,
EGLint numTimestamps,
const EGLint *names,
EGLnsecsANDROID *values)
{ … }
EGLBoolean EGLAPIENTRY eglGetNextFrameIdANDROID(EGLDisplay dpy,
EGLSurface surface,
EGLuint64KHR *frameId)
{ … }
EGLBoolean EGLAPIENTRY eglGetFrameTimestampSupportedANDROID(EGLDisplay dpy,
EGLSurface surface,
EGLint timestamp)
{ … }
EGLBoolean EGLAPIENTRY eglGetFrameTimestampsANDROID(EGLDisplay dpy,
EGLSurface surface,
EGLuint64KHR frameId,
EGLint numTimestamps,
const EGLint *timestamps,
EGLnsecsANDROID *values)
{ … }
EGLClientBuffer EGLAPIENTRY eglGetNativeClientBufferANDROID(const struct AHardwareBuffer *buffer)
{ … }
EGLint EGLAPIENTRY eglDupNativeFenceFDANDROID(EGLDisplay dpy, EGLSyncKHR sync)
{ … }
EGLBoolean EGLAPIENTRY eglPresentationTimeANDROID(EGLDisplay dpy,
EGLSurface surface,
EGLnsecsANDROID time)
{ … }
EGLDeviceEXT EGLAPIENTRY eglCreateDeviceANGLE(EGLint device_type,
void *native_device,
const EGLAttrib *attrib_list)
{ … }
EGLBoolean EGLAPIENTRY eglReleaseDeviceANGLE(EGLDeviceEXT device)
{ … }
void EGLAPIENTRY eglAcquireExternalContextANGLE(EGLDisplay dpy, EGLSurface drawAndRead)
{ … }
void EGLAPIENTRY eglReleaseExternalContextANGLE(EGLDisplay dpy)
{ … }
const char *EGLAPIENTRY eglQueryStringiANGLE(EGLDisplay dpy, EGLint name, EGLint index)
{ … }
EGLBoolean EGLAPIENTRY eglQueryDisplayAttribANGLE(EGLDisplay dpy,
EGLint attribute,
EGLAttrib *value)
{ … }
void *EGLAPIENTRY eglCopyMetalSharedEventANGLE(EGLDisplay dpy, EGLSyncKHR sync)
{ … }
void EGLAPIENTRY eglSetValidationEnabledANGLE(EGLBoolean validationState)
{ … }
void EGLAPIENTRY eglReleaseHighPowerGPUANGLE(EGLDisplay dpy, EGLContext ctx)
{ … }
void EGLAPIENTRY eglReacquireHighPowerGPUANGLE(EGLDisplay dpy, EGLContext ctx)
{ … }
void EGLAPIENTRY eglHandleGPUSwitchANGLE(EGLDisplay dpy)
{ … }
void EGLAPIENTRY eglForceGPUSwitchANGLE(EGLDisplay dpy, EGLint gpuIDHigh, EGLint gpuIDLow)
{ … }
EGLBoolean EGLAPIENTRY eglPrepareSwapBuffersANGLE(EGLDisplay dpy, EGLSurface surface)
{ … }
EGLint EGLAPIENTRY eglProgramCacheGetAttribANGLE(EGLDisplay dpy, EGLenum attrib)
{ … }
void EGLAPIENTRY eglProgramCacheQueryANGLE(EGLDisplay dpy,
EGLint index,
void *key,
EGLint *keysize,
void *binary,
EGLint *binarysize)
{ … }
void EGLAPIENTRY eglProgramCachePopulateANGLE(EGLDisplay dpy,
const void *key,
EGLint keysize,
const void *binary,
EGLint binarysize)
{ … }
EGLint EGLAPIENTRY eglProgramCacheResizeANGLE(EGLDisplay dpy, EGLint limit, EGLint mode)
{ … }
EGLBoolean EGLAPIENTRY eglQuerySurfacePointerANGLE(EGLDisplay dpy,
EGLSurface surface,
EGLint attribute,
void **value)
{ … }
EGLBoolean EGLAPIENTRY eglCreateStreamProducerD3DTextureANGLE(EGLDisplay dpy,
EGLStreamKHR stream,
const EGLAttrib *attrib_list)
{ … }
EGLBoolean EGLAPIENTRY eglStreamPostD3DTextureANGLE(EGLDisplay dpy,
EGLStreamKHR stream,
void *texture,
const EGLAttrib *attrib_list)
{ … }
EGLBoolean EGLAPIENTRY eglSwapBuffersWithFrameTokenANGLE(EGLDisplay dpy,
EGLSurface surface,
EGLFrameTokenANGLE frametoken)
{ … }
EGLBoolean EGLAPIENTRY eglGetMscRateANGLE(EGLDisplay dpy,
EGLSurface surface,
EGLint *numerator,
EGLint *denominator)
{ … }
EGLBoolean EGLAPIENTRY eglExportVkImageANGLE(EGLDisplay dpy,
EGLImage image,
void *vk_image,
void *vk_image_create_info)
{ … }
void EGLAPIENTRY eglWaitUntilWorkScheduledANGLE(EGLDisplay dpy)
{ … }
EGLBoolean EGLAPIENTRY eglGetSyncValuesCHROMIUM(EGLDisplay dpy,
EGLSurface surface,
EGLuint64KHR *ust,
EGLuint64KHR *msc,
EGLuint64KHR *sbc)
{ … }
EGLBoolean EGLAPIENTRY eglQueryDeviceAttribEXT(EGLDeviceEXT device,
EGLint attribute,
EGLAttrib *value)
{ … }
const char *EGLAPIENTRY eglQueryDeviceStringEXT(EGLDeviceEXT device, EGLint name)
{ … }
EGLBoolean EGLAPIENTRY eglQueryDisplayAttribEXT(EGLDisplay dpy, EGLint attribute, EGLAttrib *value)
{ … }
EGLBoolean EGLAPIENTRY eglQueryDmaBufFormatsEXT(EGLDisplay dpy,
EGLint max_formats,
EGLint *formats,
EGLint *num_formats)
{ … }
EGLBoolean EGLAPIENTRY eglQueryDmaBufModifiersEXT(EGLDisplay dpy,
EGLint format,
EGLint max_modifiers,
EGLuint64KHR *modifiers,
EGLBoolean *external_only,
EGLint *num_modifiers)
{ … }
EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurfaceEXT(EGLDisplay dpy,
EGLConfig config,
void *native_pixmap,
const EGLint *attrib_list)
{ … }
EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurfaceEXT(EGLDisplay dpy,
EGLConfig config,
void *native_window,
const EGLint *attrib_list)
{ … }
EGLDisplay EGLAPIENTRY eglGetPlatformDisplayEXT(EGLenum platform,
void *native_display,
const EGLint *attrib_list)
{ … }
EGLint EGLAPIENTRY eglDebugMessageControlKHR(EGLDEBUGPROCKHR callback, const EGLAttrib *attrib_list)
{ … }
EGLint EGLAPIENTRY eglLabelObjectKHR(EGLDisplay display,
EGLenum objectType,
EGLObjectKHR object,
EGLLabelKHR label)
{ … }
EGLBoolean EGLAPIENTRY eglQueryDebugKHR(EGLint attribute, EGLAttrib *value)
{ … }
EGLint EGLAPIENTRY eglClientWaitSyncKHR(EGLDisplay dpy,
EGLSyncKHR sync,
EGLint flags,
EGLTimeKHR timeout)
{ … }
EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list)
{ … }
EGLBoolean EGLAPIENTRY eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync)
{ … }
EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR(EGLDisplay dpy,
EGLSyncKHR sync,
EGLint attribute,
EGLint *value)
{ … }
EGLImageKHR EGLAPIENTRY eglCreateImageKHR(EGLDisplay dpy,
EGLContext ctx,
EGLenum target,
EGLClientBuffer buffer,
const EGLint *attrib_list)
{ … }
EGLBoolean EGLAPIENTRY eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR image)
{ … }
EGLBoolean EGLAPIENTRY eglLockSurfaceKHR(EGLDisplay dpy,
EGLSurface surface,
const EGLint *attrib_list)
{ … }
EGLBoolean EGLAPIENTRY eglQuerySurface64KHR(EGLDisplay dpy,
EGLSurface surface,
EGLint attribute,
EGLAttribKHR *value)
{ … }
EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR(EGLDisplay dpy, EGLSurface surface)
{ … }
EGLBoolean EGLAPIENTRY eglSetDamageRegionKHR(EGLDisplay dpy,
EGLSurface surface,
EGLint *rects,
EGLint n_rects)
{ … }
EGLBoolean EGLAPIENTRY eglSignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode)
{ … }
EGLStreamKHR EGLAPIENTRY eglCreateStreamKHR(EGLDisplay dpy, const EGLint *attrib_list)
{ … }
EGLBoolean EGLAPIENTRY eglDestroyStreamKHR(EGLDisplay dpy, EGLStreamKHR stream)
{ … }
EGLBoolean EGLAPIENTRY eglQueryStreamKHR(EGLDisplay dpy,
EGLStreamKHR stream,
EGLenum attribute,
EGLint *value)
{ … }
EGLBoolean EGLAPIENTRY eglQueryStreamu64KHR(EGLDisplay dpy,
EGLStreamKHR stream,
EGLenum attribute,
EGLuint64KHR *value)
{ … }
EGLBoolean EGLAPIENTRY eglStreamAttribKHR(EGLDisplay dpy,
EGLStreamKHR stream,
EGLenum attribute,
EGLint value)
{ … }
EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireKHR(EGLDisplay dpy, EGLStreamKHR stream)
{ … }
EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalKHR(EGLDisplay dpy, EGLStreamKHR stream)
{ … }
EGLBoolean EGLAPIENTRY eglStreamConsumerReleaseKHR(EGLDisplay dpy, EGLStreamKHR stream)
{ … }
EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageKHR(EGLDisplay dpy,
EGLSurface surface,
const EGLint *rects,
EGLint n_rects)
{ … }
EGLint EGLAPIENTRY eglWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags)
{ … }
EGLBoolean EGLAPIENTRY eglPostSubBufferNV(EGLDisplay dpy,
EGLSurface surface,
EGLint x,
EGLint y,
EGLint width,
EGLint height)
{ … }
EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalAttribsNV(EGLDisplay dpy,
EGLStreamKHR stream,
const EGLAttrib *attrib_list)
{ … }
}