mesa/src/egl/main
Emil Velikov 54f619fb9b egl: drop unneeded sentinel from level_strings[]
The array is local so we already know its size.

v2: Correct loop condition (Bartosz)

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Chad Versace <chadversary@chromium.org>
2017-05-08 15:34:09 +01:00
..
50_mesa.json EGL: Implement the libglvnd interface for EGL (v3) 2017-04-17 13:03:58 +01:00
README.txt
egl.def
egl.pc.in
eglapi.c egl: remove suprous header eglcompiler.h 2017-05-08 15:33:59 +01:00
eglapi.h egl: unexport _eglConvertIntsToAttribs 2016-12-09 17:33:43 +00:00
eglarray.c egl: _eglFilterArray's filter is always non-null 2017-02-16 15:27:20 +00:00
eglarray.h
eglconfig.c egl: remove suprous header eglcompiler.h 2017-05-08 15:33:59 +01:00
eglconfig.h
eglcontext.c egl: Implement __DRI_BACKGROUND_CALLABLE 2017-03-16 14:14:18 +11:00
eglcontext.h egl: Implement __DRI_BACKGROUND_CALLABLE 2017-03-16 14:14:18 +11:00
eglcurrent.c egl: initialise dummy_thread via _eglInitThreadInfo 2017-04-29 14:40:53 +01:00
eglcurrent.h
egldefines.h
egldispatchstubs.c EGL: Implement the libglvnd interface for EGL (v3) 2017-04-17 13:03:58 +01:00
egldispatchstubs.h EGL: Implement the libglvnd interface for EGL (v3) 2017-04-17 13:03:58 +01:00
egldisplay.c egl: avoid dereferencing a null display 2017-05-08 11:43:36 +01:00
egldisplay.h egl/x11: Honor the EGL_PLATFORM_X11_SCREEN_EXT attribute 2017-05-04 12:52:18 -04:00
egldriver.c
egldriver.h
eglentrypoint.h eglapi: move entrypoints list out to its own file 2017-02-24 17:00:50 +00:00
eglfallbacks.c egl: add EGL_ANDROID_native_fence_sync 2016-12-01 10:57:35 -08:00
eglglobals.c EGL: Implement the libglvnd interface for EGL (v3) 2017-04-17 13:03:58 +01:00
eglglobals.h EGL: Implement the libglvnd interface for EGL (v3) 2017-04-17 13:03:58 +01:00
eglglvnd.c EGL: Implement the libglvnd interface for EGL (v3) 2017-04-17 13:03:58 +01:00
eglimage.c egl: remove duplicate 0 assignment 2017-02-15 08:57:05 +00:00
eglimage.h
egllog.c egl: drop unneeded sentinel from level_strings[] 2017-05-08 15:34:09 +01:00
egllog.h egl: remove no longer needed logger infra 2017-05-08 15:33:54 +01:00
eglsurface.c egl: Emit error when EGLSurface is lost 2017-05-04 17:46:33 -07:00
eglsurface.h egl: Emit error when EGLSurface is lost 2017-05-04 17:46:33 -07:00
eglsync.c egl: add EGL_ANDROID_native_fence_sync 2016-12-01 10:57:35 -08:00
eglsync.h egl: add EGL_ANDROID_native_fence_sync 2016-12-01 10:57:35 -08:00
egltypedefs.h egl: remove suprous header eglcompiler.h 2017-05-08 15:33:59 +01: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.  This driver function
allocates, initializes and returns a new _EGLDriver object (usually a
subclass of that type).

As part of initialization, the dispatch table in _EGLDriver->API must be
populated with all the EGL entrypoints.  Typically, _eglInitDriverFallbacks()
can be used to plug in default/fallback functions.  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.