With the Metal backend, glFlush flushes the command buffer, but doesn't
wait for the commands to be scheduled on the GPU.
eglWaitUntilWorkScheduledANGLE does wait, hence the name.
This fixes flickering on Rive animations rendered with WebGL.
This is used to put together the list of supported WebGL extensions
based on the available extensions, per-extension required extensions
and WebGL version.
For now only macOS is supported.
IOSurface is used as a backing store because it will allow us to read
it from Skia and write to it from OpenGL without any extra copying:
- ANGLE_metal_texture_client_buffer extension is used to create
EGLSurface from IOSurface.
- Then the same IOSurface is wrapped into Metal texture and passed to
Skia allowing to share the same memory between Skia Metal backend and
ANGLE.