egl/android: set window usage flags

David Stevens requested to merge dgstevens/mesa:window-usage into master

When creating an egl surface from an ANativeWindow, the window's usage flags need to be set so that buffers are allocated properly.

In particular, GRALLOC_USAGE_HW_RENDER is necessary for buffers allocated by minigbm's virtio_gpu backend to work properly, regardless of the consumer. For example, without this change, a non-HWC backed virtual display with a software consumer won't be given an egl_image by virglrenderer and minigbm will skip transfers from the host to the guest (since the buffer's flags indicate nothing in the host can modify the buffer).

Merge request reports