Files
Kenneth Russell 51386f4a5e Reland "Define and expose EGL_ANGLE_power_preference extension."
This is a reland of ac58e63295

The original CL was reverted in a rush because I thought there was an
uninitialized variable bug, but upon later re-review this turned out to
not be the case.

Original change's description:
> Define and expose EGL_ANGLE_power_preference extension.
>
> Allows application to select the integrated or discrete GPU on
> dual-GPU macOS systems.
>
> Tested by modifying the example program at:
> https://github.com/grorg/ANGLEIOSurfaceTest
>
> and verifying that both integrated and discrete GPUs can be selected.
> (The changes to that program will be upstreamed once some build issues
> are resolved.)
>
> Bug: 2813
> Change-Id: Ibeb17778512896456d220e9bc4cf8f222aa57057
> Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1570081
> Commit-Queue: Kenneth Russell <[email protected]>
> Reviewed-by: Geoff Lang <[email protected]>

Bug: 2813
Tbr: [email protected]
Tbr: [email protected]
Change-Id: Iea000dd718f4f4b4f57237adb1dc44381b10106b
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1575419
Reviewed-by: Kenneth Russell <[email protected]>
Commit-Queue: Kenneth Russell <[email protected]>
2019-04-19 07:22:23 +00:00
..
2018-09-25 21:52:02 +00:00
2018-09-25 21:52:02 +00:00

ANGLE EGL Headers

The EGL headers ANGLE uses are generated using the Khronos tools but modified to include function pointer types and function prototype guards.

Regenerating EGL.h

  1. Install Python 3 (not 2) with the lxml addon. You can do this using pip install lxml from your Python's Scripts folder.

  2. Clone https://github.com/KhronosGroup/EGL-Registry.git.

  3. Edit EGL-Registry/api/genheaders.py:

    1. Look for the section titled # EGL API - EGL/egl.h (no function pointers, yet @@@)
    2. Change genFuncPointers = False, to genFuncPointers = True,
    3. Change protectProto = False, to protectProto = 'nonzero',
    4. Change protectProtoStr = 'EGL_EGLEXT_PROTOTYPES', to protectProtoStr = 'EGL_EGL_PROTOTYPES',
  4. Set your working directory to EGL-Registry/api/.

  5. Run python genheaders.py -registry egl.xml EGL/egl.h

  6. The generated header will now be in EGL-Registry/api/EGL/egl.h. You can copy the header over to this folder.

  7. Also update scripts/egl.xml with the latest version from EGL-Registry/api/.