[Mesa-dev] [PATCH 11/18] egl/wayland: Remove has_format enum
Emil Velikov
emil.l.velikov at gmail.com
Thu Feb 8 22:05:55 UTC 2018
On 8 February 2018 at 13:55, Daniel Stone <daniels at collabora.com> wrote:
> Instead of the has_format enum, use an index into the visual array. This
> makes adding new formats less typing.
>
> Signed-off-by: Daniel Stone <daniels at collabora.com>
> ---
> src/egl/drivers/dri2/platform_wayland.c | 29 ++++++++++-------------------
> 1 file changed, 10 insertions(+), 19 deletions(-)
>
> diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
> index 080ed59eb7f..91e2ef8cd32 100644
> --- a/src/egl/drivers/dri2/platform_wayland.c
> +++ b/src/egl/drivers/dri2/platform_wayland.c
> @@ -57,17 +57,8 @@
> #define DRM_FORMAT_MOD_LINEAR 0
> #endif
>
> -enum wl_drm_format_flags {
> - HAS_ARGB8888 = 1,
> - HAS_XRGB8888 = 2,
> - HAS_RGB565 = 4,
> - HAS_ARGB2101010 = 8,
> - HAS_XRGB2101010 = 16,
> -};
> -
> static const struct dri2_wl_visual {
Please add a small comment about the order/entries index.
-Emil
More information about the mesa-dev
mailing list