summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2016-07-15 12:47:37 +0100
committerEmil Velikov <[email protected]>2016-10-14 12:16:07 +0100
commit532ec2edd878e5691998a1b2132a68a89845b55e (patch)
treecb4edd53251e398754c872393d3a1d39b7a19470 /src/egl/drivers/dri2
parentd6dcf3b4ca7053e9c49780a398c3baabd884ff2c (diff)
egl/dri2: use dri2_egl_display inline wrapper where possible
This way the only places that reference DriverData are the ones that manipulate it. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/egl/drivers/dri2')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index f2ed3c7d3a2..5ad97b9c81b 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -158,7 +158,7 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
const unsigned int *rgba_masks)
{
struct dri2_egl_config *conf;
- struct dri2_egl_display *dri2_dpy;
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
_EGLConfig base;
unsigned int attrib, value, double_buffer;
bool srgb = false;
@@ -169,7 +169,6 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
EGLint config_id;
int i;
- dri2_dpy = disp->DriverData;
_eglInitConfig(&base, disp, id);
i = 0;
@@ -432,7 +431,7 @@ dri2_bind_extensions(struct dri2_egl_display *dri2_dpy,
static const __DRIextension **
dri2_open_driver(_EGLDisplay *disp)
{
- struct dri2_egl_display *dri2_dpy = disp->DriverData;
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
const __DRIextension **extensions = NULL;
char path[PATH_MAX], *search_paths, *p, *next, *end;
char *get_extensions_name;
@@ -516,7 +515,7 @@ dri2_open_driver(_EGLDisplay *disp)
EGLBoolean
dri2_load_driver_dri3(_EGLDisplay *disp)
{
- struct dri2_egl_display *dri2_dpy = disp->DriverData;
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
const __DRIextension **extensions;
extensions = dri2_open_driver(disp);
@@ -535,7 +534,7 @@ dri2_load_driver_dri3(_EGLDisplay *disp)
EGLBoolean
dri2_load_driver(_EGLDisplay *disp)
{
- struct dri2_egl_display *dri2_dpy = disp->DriverData;
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
const __DRIextension **extensions;
extensions = dri2_open_driver(disp);
@@ -554,7 +553,7 @@ dri2_load_driver(_EGLDisplay *disp)
EGLBoolean
dri2_load_driver_swrast(_EGLDisplay *disp)
{
- struct dri2_egl_display *dri2_dpy = disp->DriverData;
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
const __DRIextension **extensions;
extensions = dri2_open_driver(disp);
@@ -680,11 +679,9 @@ EGLBoolean
dri2_create_screen(_EGLDisplay *disp)
{
const __DRIextension **extensions;
- struct dri2_egl_display *dri2_dpy;
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
unsigned i;
- dri2_dpy = disp->DriverData;
-
if (dri2_dpy->image_driver) {
dri2_dpy->dri_screen =
dri2_dpy->image_driver->createNewScreen2(0, dri2_dpy->fd,