egl/main: expose only core EGL functions statically
authorEmil Velikov <emil.l.velikov@gmail.com>
Mon, 11 May 2015 22:43:48 +0000 (23:43 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Thu, 14 May 2015 21:00:05 +0000 (21:00 +0000)
commite3cc5ad49d2f3f08c29d0b64d1c0c52560789d93
treeed4586380951d11b81c54da49c2ba2c758561971
parentf9bf9133ccc3764dc38f6359a26004e12b888af3
egl/main: expose only core EGL functions statically

The EGL 1.3, 1.4 and 1.5 spec (as quoted below) explicitly mentions that
providing static symbols for functions provided by EGL extensions is not
portable. Considering that relatively recently we've seen a non-mesa
desktop EGL implementation, the fact that we opt for such behaviour has
gone unnoticed.

From the EGL 1.5 specification:
    For functions that are queryable with eglGetProcAddress,
    implementations may choose to also export those functions
    statically from the object libraries implementing those
    functions. However, portable clients cannot rely on this
    behavior.

To encourage devs against writing such non-portable code, let's hide the
symbols similar to the official binary driver from NVIDIA.

v2: Quote the EGL 1.5 spec, as suggested by Chad.

Cc: Brian Paul <brianp@vmware.com>
Cc: Chad Versace <chad.versace@intel.com>
Cc: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
src/egl/main/eglapi.c
src/egl/main/egltypedefs.h