summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2/egl_dri2.h
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2015-09-13 12:25:27 +0100
committerEmil Velikov <[email protected]>2015-10-07 15:17:57 +0100
commit858f2f2ae6d72f338fdd6d544b0c733814e22724 (patch)
tree9a443d5b82eb16e5727f6539b3c9d3f6173c1a23 /src/egl/drivers/dri2/egl_dri2.h
parentb69cfbdf18fa64606a76761b20bc268f4ac731e5 (diff)
egl/dri2: ease srgb __DRIconfig conditionals
One can simplify the if-else chain, by declaring the driconfigs as a two sized array, whist using srgb as a index to the correct entry. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src/egl/drivers/dri2/egl_dri2.h')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h
index 9aa2a8c1003..0e837b3eb8b 100644
--- a/src/egl/drivers/dri2/egl_dri2.h
+++ b/src/egl/drivers/dri2/egl_dri2.h
@@ -284,10 +284,8 @@ struct dri2_egl_surface
struct dri2_egl_config
{
_EGLConfig base;
- const __DRIconfig *dri_single_config;
- const __DRIconfig *dri_double_config;
- const __DRIconfig *dri_srgb_single_config;
- const __DRIconfig *dri_srgb_double_config;
+ const __DRIconfig *dri_single_config[2];
+ const __DRIconfig *dri_double_config[2];
};
struct dri2_egl_image