egl: simplify dri_config conditionals
authorEric Engestrom <eric.engestrom@imgtec.com>
Wed, 21 Jun 2017 09:40:31 +0000 (10:40 +0100)
committerEric Engestrom <eric.engestrom@imgtec.com>
Thu, 22 Jun 2017 13:54:36 +0000 (14:54 +0100)
commitb81cfc73408b3d55772a56fbfa0e505b4da281a8
tree1aaae171bec958a570de9f1819eb3a1a76e249bd
parentbcd67b171152dfba2402de923a44dfe946e2684a
egl: simplify dri_config conditionals

In the same spirit as 858f2f2ae6 (egl/dri2: ease srgb __DRIconfig
conditionals), let's merge dri_single_config and dri_double_config into
a single dri_config[2].

This moves the `if (double) dri_double_config else dri_single_config`
logic to `dri_config[double]`, reducing code duplication and making it
easier to read.

Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/egl/drivers/dri2/egl_dri2.c
src/egl/drivers/dri2/egl_dri2.h