egl/dri2: check if the EGL API is valid before adding it to ClientAPIs
authorEmil Velikov <emil.velikov@collabora.com>
Thu, 25 Aug 2016 11:15:13 +0000 (12:15 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 30 Aug 2016 13:50:10 +0000 (14:50 +0100)
commit03eaa6c5969d3eb87112d96a0e33b4eb46bf9f5a
tree040ee35373313efd8db796aca0c0daecc268f1d4
parent4472b6e46985d0e80bdcf385f9dde542daeb5c55
egl/dri2: check if the EGL API is valid before adding it to ClientAPIs

In the rather unlikely case that the API is considered invalid, don't
add it to the (supported) ClientAPIs bitmask.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
---
Strictly speaking we only need this in the Android case for OpenGL.
Adding it everywhere doesn't hurt us since the compiler will const
propagate and optimise/remove these.
src/egl/drivers/dri2/egl_dri2.c