mesa/src/egl/main
renchenglei 500b45a98a egl: Enable eglGetPlatformDisplay on Android Platform
This helps to add eglGetPlatformDisplay support on Android
Platform.
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-06-29 12:20:17 +01:00
..
50_mesa.json
README.txt egl: move alloc & init out of _eglBuiltInDriver{DRI2,Haiku} 2018-10-31 11:01:54 +00:00
egl.def
eglapi.c egl: Enable eglGetPlatformDisplay on Android Platform 2019-06-29 12:20:17 +01:00
eglapi.h egl: replace dead vfunc with an error 2019-06-25 07:47:19 +01:00
eglarray.c
eglarray.h
eglconfig.c egl: move bad_param check further up 2019-06-22 15:17:42 +00:00
eglconfig.h egl: use coherent variable names 2019-02-06 11:53:24 +00:00
eglcontext.c egl: Allow EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY in ES and GL 2019-05-17 15:13:15 -07:00
eglcontext.h egl: use coherent variable names 2019-02-06 11:53:24 +00:00
eglcurrent.c egl: hard-code destroy function instead of passing it around as a pointer 2019-05-02 14:44:16 +00:00
eglcurrent.h
egldefines.h egl: remove unused include 2019-01-11 14:37:47 +00:00
egldevice.c egl: Don't add hardware device if there is no render node v2. 2019-06-19 07:17:23 +02:00
egldevice.h egl: add EGL_platform_device support 2019-06-05 13:35:21 -04:00
egldispatchstubs.c egl/glvnd: correctly report errors when vendor cannot be found 2018-11-05 20:53:05 +00:00
egldispatchstubs.h
egldisplay.c egl: Enable eglGetPlatformDisplay on Android Platform 2019-06-29 12:20:17 +01:00
egldisplay.h egl: Enable eglGetPlatformDisplay on Android Platform 2019-06-29 12:20:17 +01:00
egldriver.c egl: drop empty eglfallbacks.c 2019-06-25 06:36:54 +00:00
egldriver.h egl: drop empty eglfallbacks.c 2019-06-25 06:36:54 +00:00
eglentrypoint.h egl: Implement EGL API for MESA_query_driver 2019-01-24 14:37:47 +00:00
eglglobals.c egl: add EGL_platform_device support 2019-06-05 13:35:21 -04:00
eglglobals.h egl: add base EGL_EXT_device_base implementation 2018-11-01 00:05:43 +00:00
eglglvnd.c
eglimage.c egl: use coherent variable names 2019-02-06 11:53:24 +00:00
eglimage.h egl: use coherent variable names 2019-02-06 11:53:24 +00:00
egllog.c
egllog.h
eglsurface.c egl: store the native surface pointer in struct _egl_surface 2019-05-14 12:41:14 +00:00
eglsurface.h egl: store the native surface pointer in struct _egl_surface 2019-05-14 12:41:14 +00:00
eglsync.c egl: use coherent variable names 2019-02-06 11:53:24 +00:00
eglsync.h egl: use coherent variable names 2019-02-06 11:53:24 +00:00
egltypedefs.h egl: add base EGL_EXT_device_base implementation 2018-11-01 00:05:43 +00:00

README.txt


Notes about the EGL library:


The EGL code here basically consists of two things:

1. An EGL API dispatcher.  This directly routes all the eglFooBar() API
   calls into driver-specific functions.

2. Fallbacks for EGL API functions.  A driver _could_ implement all the
   EGL API calls from scratch.  But in many cases, the fallbacks provided
   in libEGL (such as eglChooseConfig()) will do the job.



Bootstrapping:

When the apps calls eglInitialize() a device driver is selected and loaded
(look for _eglAddDrivers() and _eglLoadModule() in egldriver.c).

The built-in driver's entry point function is then called and given
a freshly allocated and initialised _EGLDriver, with default fallback
entrypoints set.

As part of initialization, the dispatch table in _EGLDriver->API must be
populated with all the EGL entrypoints. Some functions like
driver->API.Initialize and driver->API.Terminate _must_ be implemented
with driver-specific code (no default/fallback function is possible).


Shortly after, the driver->API.Initialize() function is executed.  Any additional
driver initialization that wasn't done in the driver entry point should be
done at this point.  Typically, this will involve setting up visual configs, etc.



Special Functions:

Certain EGL functions _must_ be implemented by the driver.  This includes:

eglCreateContext
eglCreateWindowSurface
eglCreatePixmapSurface
eglCreatePBufferSurface
eglMakeCurrent
eglSwapBuffers

Most of the EGLConfig-related functions can be implemented with the
defaults/fallbacks.  Same thing for the eglGet/Query functions.




Teardown:

When eglTerminate() is called, the driver->API.Terminate() function is
called.  The driver should clean up after itself.  eglTerminate() will
then close/unload the driver (shared library).




Subclassing:

The internal libEGL data structures such as _EGLDisplay, _EGLContext,
_EGLSurface, etc should be considered base classes from which drivers
will derive subclasses.