On 8 February 2018 at 13:55, Daniel Stone <[email protected]> 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 <[email protected]> > --- > 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 _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
