OSDN Git Service

egl/wayland: use bitset.h for `formats` bit set
authorEric Engestrom <eric.engestrom@intel.com>
Tue, 27 Nov 2018 12:27:45 +0000 (12:27 +0000)
committerEric Engestrom <eric.engestrom@intel.com>
Mon, 1 Jul 2019 17:35:54 +0000 (18:35 +0100)
commitfbf7c38da35afe7f1de05c3896695a7a302ff925
tree5ccff0925393c1171697dd41abcab1ae8b11f827
parentd5f63990b4bdf0458b48da34dddb7656b8393ec7
egl/wayland: use bitset.h for `formats` bit set

Currently only 7 formats are supported, but we don't want the 16 limit
(it's an `unsigned`) to hit us by surprise :]

Let's use bitset.h's BITSET magic to allow us to have any number of
formats, with a static assert to make sure we don't forget to update it.

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/egl/drivers/dri2/egl_dri2.h
src/egl/drivers/dri2/platform_wayland.c