mesa/src/egl/main
Matt Turner 4e97084591 egl: Fix inclusion of egl.h+mesa_glinterop.h
Previously clang would warn about redefinition of typedef EGLDisplay. Avoid
this by adding preprocessor guards to mesa_glinterop.h and including it
after EGL.h is indirectly included.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2017-08-21 14:45:44 -07:00
..
50_mesa.json
egl.def
egl.pc.in
eglapi.c egl: Fix inclusion of egl.h+mesa_glinterop.h 2017-08-21 14:45:44 -07:00
eglapi.h egl/android: support for EGL_KHR_partial_update 2017-06-11 01:02:09 +01:00
eglarray.c
eglarray.h
eglconfig.c egl: split enums to make use of -Wswitch 2017-08-01 17:43:11 +01:00
eglconfig.h
eglcontext.c egl: move KHR_no_error vs debug/robustness check further down 2017-07-26 11:50:32 +01:00
eglcontext.h egl: Add EGL_KHR_create_context_no_error support 2017-07-14 21:23:44 +02:00
eglcurrent.c
eglcurrent.h
egldefines.h
egldispatchstubs.c
egldispatchstubs.h
egldisplay.c egl: Move _eglPointerIsDereferencable() to eglglobals.[ch] 2017-07-24 10:27:43 +01:00
egldisplay.h egl: Add EGL_KHR_create_context_no_error support 2017-07-14 21:23:44 +02:00
egldriver.c egl: remove unnecessary empty array element 2017-08-01 17:43:15 +01:00
egldriver.h
eglentrypoint.h egl/android: support for EGL_KHR_partial_update 2017-06-11 01:02:09 +01:00
eglfallbacks.c egl/android: support for EGL_KHR_partial_update 2017-06-11 01:02:09 +01:00
eglglobals.c egl: use designated initaliser for _eglGlobal 2017-08-01 17:43:06 +01:00
eglglobals.h egl: Move _eglPointerIsDereferencable() to eglglobals.[ch] 2017-07-24 10:27:43 +01:00
eglglvnd.c
eglimage.c egl: fix whitespace issues from eglimage code 2017-07-25 12:54:33 +03:00
eglimage.h egl: call _eglError within _eglParseImageAttribList 2017-07-12 15:42:51 +01:00
egllog.c egl: fix android logger compilation 2017-05-15 16:03:51 +01:00
egllog.h egl: remove no longer needed logger infra 2017-05-08 15:33:54 +01:00
eglsurface.c egl: deduplicate swap interval clamping logic 2017-08-01 17:36:57 +01:00
eglsurface.h egl/android: support for EGL_KHR_partial_update 2017-06-11 01:02:09 +01:00
eglsync.c
eglsync.h
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.