egl_dri2: add support for Android
Add platform_android.c that supports _EGL_PLAFORM_ANDROID. It works
with drm_gralloc, where back buffers of windows are backed by GEM
objects.
In Android a native window has a queue of back buffers allocated by the
server, through drm_gralloc. For each frame, EGL needs to
dequeue the next back buffer
render to the buffer
enqueue the buffer
After enqueuing, the buffer is no longer valid to EGL. A window has no
depth buffer or other aux buffers. They need to be allocated locally by
EGL.
Reviewed-by: Benjamin Franzke <benjaminfranzke@googlemail.com>
Reviewed-by: Chad Versace <chad@chad-versace.us>
[olv: with assorted minor changes, mostly suggested during the review]