Home | History | Annotate | only in /external/mesa3d/src/egl/main
Up to higher level directory
NameDateSize
.gitignore20-Jun-20149
Android.mk20-Jun-20144K
egl.def20-Jun-2014687
egl.pc.in20-Jun-2014275
eglapi.c20-Jun-201442.8K
eglapi.h20-Jun-201410.3K
eglarray.c20-Jun-20144.7K
eglarray.h20-Jun-20142.3K
eglcompiler.h20-Jun-20143.8K
eglconfig.c20-Jun-201425.3K
eglconfig.h20-Jun-20147.2K
eglcontext.c20-Jun-201417.8K
eglcontext.h20-Jun-20144.1K
eglcurrent.c20-Jun-20148K
eglcurrent.h20-Jun-20142.8K
egldefines.h20-Jun-20141.6K
egldisplay.c20-Jun-201410.6K
egldisplay.h20-Jun-20146K
egldriver.c20-Jun-201415.2K
egldriver.h20-Jun-20143.6K
eglfallbacks.c20-Jun-20144.4K
eglglobals.c20-Jun-20142.5K
eglglobals.h20-Jun-20141.8K
eglimage.c20-Jun-20143.3K
eglimage.h20-Jun-20143.7K
egllog.c20-Jun-20145K
egllog.h20-Jun-20141.9K
eglmisc.c20-Jun-20144.9K
eglmisc.h20-Jun-20141.6K
eglmode.c20-Jun-20149.6K
eglmode.h20-Jun-20142.7K
eglmutex.h20-Jun-20142.3K
eglscreen.c20-Jun-20145.9K
eglscreen.h20-Jun-20143.5K
eglstring.c20-Jun-20141.7K
eglstring.h20-Jun-20141.8K
eglsurface.c20-Jun-201413.8K
eglsurface.h20-Jun-20144.6K
eglsync.c20-Jun-20143.3K
eglsync.h20-Jun-20143.3K
egltypedefs.h20-Jun-20142.2K
Makefile.am20-Jun-20143.7K
README.txt20-Jun-20142K
SConscript20-Jun-20141K

README.txt

      1 
      2 
      3 Notes about the EGL library:
      4 
      5 
      6 The EGL code here basically consists of two things:
      7 
      8 1. An EGL API dispatcher.  This directly routes all the eglFooBar() API
      9    calls into driver-specific functions.
     10 
     11 2. Fallbacks for EGL API functions.  A driver _could_ implement all the
     12    EGL API calls from scratch.  But in many cases, the fallbacks provided
     13    in libEGL (such as eglChooseConfig()) will do the job.
     14 
     15 
     16 
     17 Bootstrapping:
     18 
     19 When the apps calls eglOpenDisplay() a device driver is selected and loaded
     20 (look for dlsym() or LoadLibrary() in egldriver.c).
     21 
     22 The driver's _eglMain() function is then called.  This driver function
     23 allocates, initializes and returns a new _EGLDriver object (usually a
     24 subclass of that type).
     25 
     26 As part of initialization, the dispatch table in _EGLDriver->API must be
     27 populated with all the EGL entrypoints.  Typically, _eglInitDriverFallbacks()
     28 can be used to plug in default/fallback functions.  Some functions like
     29 driver->API.Initialize and driver->API.Terminate _must_ be implemented
     30 with driver-specific code (no default/fallback function is possible).
     31 
     32 
     33 A bit later, the app will call eglInitialize().  This will get routed
     34 to the driver->API.Initialize() function.  Any additional driver
     35 initialization that wasn't done in _eglMain() should be done at this
     36 point.  Typically, this will involve setting up visual configs, etc.
     37 
     38 
     39 
     40 Special Functions:
     41 
     42 Certain EGL functions _must_ be implemented by the driver.  This includes:
     43 
     44 eglCreateContext
     45 eglCreateWindowSurface
     46 eglCreatePixmapSurface
     47 eglCreatePBufferSurface
     48 eglMakeCurrent
     49 eglSwapBuffers
     50 
     51 Most of the EGLConfig-related functions can be implemented with the
     52 defaults/fallbacks.  Same thing for the eglGet/Query functions.
     53 
     54 
     55 
     56 
     57 Teardown:
     58 
     59 When eglTerminate() is called, the driver->API.Terminate() function is
     60 called.  The driver should clean up after itself.  eglTerminate() will
     61 then close/unload the driver (shared library).
     62 
     63 
     64 
     65 
     66 Subclassing:
     67 
     68 The internal libEGL data structures such as _EGLDisplay, _EGLContext,
     69 _EGLSurface, etc should be considered base classes from which drivers
     70 will derive subclasses.
     71 
     72