summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2019-02-02 11:38:45 +0000
committerEric Engestrom <[email protected]>2019-02-06 11:53:24 +0000
commit54fa5eceae237598d6fb329ec7cbe1d3a85e7d39 (patch)
tree870badc295851feaba8cf7e43318ed9542a7c0a7 /src/egl/drivers
parenta81d5587d6ad20506c13199a1f4573fdf6350709 (diff)
egl: use coherent variable names
`EGLDisplay` variables (the opaque Khronos type) have mostly been consistently called `dpy`, as this is the name used in the Khronos specs. However, `_EGLDisplay` variables (our internal struct) have been randomly called `dpy` when there was no local variable clash with `EGLDisplay`s, and `disp` otherwise. Let's be consistent and use `dpy` for the Khronos type, and `disp` for our struct. Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Emil Velikov <[email protected]> Acked-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/egl/drivers')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c152
-rw-r--r--src/egl/drivers/dri2/egl_dri2.h36
-rw-r--r--src/egl/drivers/dri2/egl_dri2_fallbacks.h22
-rw-r--r--src/egl/drivers/dri2/platform_android.c12
-rw-r--r--src/egl/drivers/dri2/platform_surfaceless.c16
-rw-r--r--src/egl/drivers/dri2/platform_x11.c6
-rw-r--r--src/egl/drivers/dri2/platform_x11_dri3.c10
-rw-r--r--src/egl/drivers/haiku/egl_haiku.cpp20
8 files changed, 137 insertions, 137 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index c98b9a5d18a..390e99d9a7a 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -1360,11 +1360,11 @@ dri2_destroy_context(_EGLDriver *drv, _EGLDisplay *disp, _EGLContext *ctx)
}
EGLBoolean
-dri2_init_surface(_EGLSurface *surf, _EGLDisplay *dpy, EGLint type,
+dri2_init_surface(_EGLSurface *surf, _EGLDisplay *disp, EGLint type,
_EGLConfig *conf, const EGLint *attrib_list, EGLBoolean enable_out_fence)
{
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf);
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
dri2_surf->out_fence_fd = -1;
dri2_surf->enable_out_fence = false;
@@ -1375,7 +1375,7 @@ dri2_init_surface(_EGLSurface *surf, _EGLDisplay *dpy, EGLint type,
dri2_surf->enable_out_fence = enable_out_fence;
}
- return _eglInitSurface(surf, dpy, type, conf, attrib_list);
+ return _eglInitSurface(surf, disp, type, conf, attrib_list);
}
static void
@@ -1399,22 +1399,22 @@ dri2_fini_surface(_EGLSurface *surf)
}
static EGLBoolean
-dri2_destroy_surface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf)
+dri2_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
{
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
if (!_eglPutSurface(surf))
return EGL_TRUE;
- return dri2_dpy->vtbl->destroy_surface(drv, dpy, surf);
+ return dri2_dpy->vtbl->destroy_surface(drv, disp, surf);
}
static void
dri2_surf_update_fence_fd(_EGLContext *ctx,
- _EGLDisplay *dpy, _EGLSurface *surf)
+ _EGLDisplay *disp, _EGLSurface *surf)
{
__DRIcontext *dri_ctx = dri2_egl_context(ctx)->dri_context;
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf);
int fence_fd = -1;
void *fence;
@@ -1559,41 +1559,41 @@ dri2_get_proc_address(_EGLDriver *drv, const char *procname)
}
static _EGLSurface*
-dri2_create_window_surface(_EGLDriver *drv, _EGLDisplay *dpy,
+dri2_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *conf, void *native_window,
const EGLint *attrib_list)
{
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
- return dri2_dpy->vtbl->create_window_surface(drv, dpy, conf, native_window,
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+ return dri2_dpy->vtbl->create_window_surface(drv, disp, conf, native_window,
attrib_list);
}
static _EGLSurface*
-dri2_create_pixmap_surface(_EGLDriver *drv, _EGLDisplay *dpy,
+dri2_create_pixmap_surface(_EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *conf, void *native_pixmap,
const EGLint *attrib_list)
{
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
- return dri2_dpy->vtbl->create_pixmap_surface(drv, dpy, conf, native_pixmap,
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+ return dri2_dpy->vtbl->create_pixmap_surface(drv, disp, conf, native_pixmap,
attrib_list);
}
static _EGLSurface*
-dri2_create_pbuffer_surface(_EGLDriver *drv, _EGLDisplay *dpy,
+dri2_create_pbuffer_surface(_EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *conf, const EGLint *attrib_list)
{
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
- return dri2_dpy->vtbl->create_pbuffer_surface(drv, dpy, conf, attrib_list);
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+ return dri2_dpy->vtbl->create_pbuffer_surface(drv, disp, conf, attrib_list);
}
static EGLBoolean
-dri2_swap_interval(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf,
+dri2_swap_interval(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
EGLint interval)
{
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
if (!dri2_dpy->vtbl->swap_interval)
return EGL_TRUE;
- return dri2_dpy->vtbl->swap_interval(drv, dpy, surf, interval);
+ return dri2_dpy->vtbl->swap_interval(drv, disp, surf, interval);
}
/**
@@ -1633,67 +1633,67 @@ dri2_flush_drawable_for_swapbuffers(_EGLDisplay *disp, _EGLSurface *draw)
}
static EGLBoolean
-dri2_swap_buffers(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf)
+dri2_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
{
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
_EGLContext *ctx = _eglGetCurrentContext();
if (ctx && surf)
- dri2_surf_update_fence_fd(ctx, dpy, surf);
- return dri2_dpy->vtbl->swap_buffers(drv, dpy, surf);
+ dri2_surf_update_fence_fd(ctx, disp, surf);
+ return dri2_dpy->vtbl->swap_buffers(drv, disp, surf);
}
static EGLBoolean
-dri2_swap_buffers_with_damage(_EGLDriver *drv, _EGLDisplay *dpy,
+dri2_swap_buffers_with_damage(_EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surf,
const EGLint *rects, EGLint n_rects)
{
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
_EGLContext *ctx = _eglGetCurrentContext();
if (ctx && surf)
- dri2_surf_update_fence_fd(ctx, dpy, surf);
- return dri2_dpy->vtbl->swap_buffers_with_damage(drv, dpy, surf,
+ dri2_surf_update_fence_fd(ctx, disp, surf);
+ return dri2_dpy->vtbl->swap_buffers_with_damage(drv, disp, surf,
rects, n_rects);
}
static EGLBoolean
-dri2_swap_buffers_region(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf,
+dri2_swap_buffers_region(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
EGLint numRects, const EGLint *rects)
{
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
- return dri2_dpy->vtbl->swap_buffers_region(drv, dpy, surf, numRects, rects);
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+ return dri2_dpy->vtbl->swap_buffers_region(drv, disp, surf, numRects, rects);
}
static EGLBoolean
-dri2_set_damage_region(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf,
+dri2_set_damage_region(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
EGLint *rects, EGLint n_rects)
{
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
- return dri2_dpy->vtbl->set_damage_region(drv, dpy, surf, rects, n_rects);
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+ return dri2_dpy->vtbl->set_damage_region(drv, disp, surf, rects, n_rects);
}
static EGLBoolean
-dri2_post_sub_buffer(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf,
+dri2_post_sub_buffer(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
EGLint x, EGLint y, EGLint width, EGLint height)
{
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
- return dri2_dpy->vtbl->post_sub_buffer(drv, dpy, surf, x, y, width, height);
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+ return dri2_dpy->vtbl->post_sub_buffer(drv, disp, surf, x, y, width, height);
}
static EGLBoolean
-dri2_copy_buffers(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf,
+dri2_copy_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
void *native_pixmap_target)
{
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
- return dri2_dpy->vtbl->copy_buffers(drv, dpy, surf, native_pixmap_target);
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+ return dri2_dpy->vtbl->copy_buffers(drv, disp, surf, native_pixmap_target);
}
static EGLint
-dri2_query_buffer_age(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf)
+dri2_query_buffer_age(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
{
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
- return dri2_dpy->vtbl->query_buffer_age(drv, dpy, surf);
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+ return dri2_dpy->vtbl->query_buffer_age(drv, disp, surf);
}
static EGLBoolean
@@ -1805,12 +1805,12 @@ dri2_release_tex_image(_EGLDriver *drv,
}
static _EGLImage*
-dri2_create_image(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx,
+dri2_create_image(_EGLDriver *drv, _EGLDisplay *disp, _EGLContext *ctx,
EGLenum target, EGLClientBuffer buffer,
const EGLint *attr_list)
{
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
- return dri2_dpy->vtbl->create_image(drv, dpy, ctx, target, buffer,
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+ return dri2_dpy->vtbl->create_image(drv, disp, ctx, target, buffer,
attr_list);
}
@@ -1966,12 +1966,12 @@ dri2_create_image_wayland_wl_buffer(_EGLDisplay *disp, _EGLContext *ctx,
#endif
static EGLBoolean
-dri2_get_sync_values_chromium(_EGLDisplay *dpy, _EGLSurface *surf,
+dri2_get_sync_values_chromium(_EGLDisplay *disp, _EGLSurface *surf,
EGLuint64KHR *ust, EGLuint64KHR *msc,
EGLuint64KHR *sbc)
{
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
- return dri2_dpy->vtbl->get_sync_values(dpy, surf, ust, msc, sbc);
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+ return dri2_dpy->vtbl->get_sync_values(disp, surf, ust, msc, sbc);
}
/**
@@ -2073,21 +2073,21 @@ dri2_create_image_khr_texture(_EGLDisplay *disp, _EGLContext *ctx,
}
static EGLBoolean
-dri2_query_surface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf,
+dri2_query_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
EGLint attribute, EGLint *value)
{
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
if (!dri2_dpy->vtbl->query_surface)
- return _eglQuerySurface(drv, dpy, surf, attribute, value);
- return dri2_dpy->vtbl->query_surface(drv, dpy, surf, attribute, value);
+ return _eglQuerySurface(drv, disp, surf, attribute, value);
+ return dri2_dpy->vtbl->query_surface(drv, disp, surf, attribute, value);
}
static struct wl_buffer*
-dri2_create_wayland_buffer_from_image(_EGLDriver *drv, _EGLDisplay *dpy,
+dri2_create_wayland_buffer_from_image(_EGLDriver *drv, _EGLDisplay *disp,
_EGLImage *img)
{
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
- return dri2_dpy->vtbl->create_wayland_buffer_from_image(drv, dpy, img);
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+ return dri2_dpy->vtbl->create_wayland_buffer_from_image(drv, disp, img);
}
#ifdef HAVE_LIBDRM
@@ -2909,11 +2909,11 @@ dri2_egl_unref_sync(struct dri2_egl_display *dri2_dpy,
}
static _EGLSync *
-dri2_create_sync(_EGLDriver *drv, _EGLDisplay *dpy,
+dri2_create_sync(_EGLDriver *drv, _EGLDisplay *disp,
EGLenum type, const EGLAttrib *attrib_list)
{
_EGLContext *ctx = _eglGetCurrentContext();
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri2_egl_context *dri2_ctx = dri2_egl_context(ctx);
struct dri2_egl_sync *dri2_sync;
EGLint ret;
@@ -2925,7 +2925,7 @@ dri2_create_sync(_EGLDriver *drv, _EGLDisplay *dpy,
return NULL;
}
- if (!_eglInitSync(&dri2_sync->base, dpy, type, attrib_list)) {
+ if (!_eglInitSync(&dri2_sync->base, disp, type, attrib_list)) {
free(dri2_sync);
return NULL;
}
@@ -3010,9 +3010,9 @@ dri2_create_sync(_EGLDriver *drv, _EGLDisplay *dpy,
}
static EGLBoolean
-dri2_destroy_sync(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync)
+dri2_destroy_sync(_EGLDriver *drv, _EGLDisplay *disp, _EGLSync *sync)
{
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri2_egl_sync *dri2_sync = dri2_egl_sync(sync);
EGLint ret = EGL_TRUE;
EGLint err;
@@ -3039,9 +3039,9 @@ dri2_destroy_sync(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync)
}
static EGLint
-dri2_dup_native_fence_fd(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync)
+dri2_dup_native_fence_fd(_EGLDriver *drv, _EGLDisplay *disp, _EGLSync *sync)
{
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri2_egl_sync *dri2_sync = dri2_egl_sync(sync);
assert(sync->Type == EGL_SYNC_NATIVE_FENCE_ANDROID);
@@ -3064,22 +3064,22 @@ dri2_dup_native_fence_fd(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync)
}
static void
-dri2_set_blob_cache_funcs(_EGLDriver *drv, _EGLDisplay *dpy,
+dri2_set_blob_cache_funcs(_EGLDriver *drv, _EGLDisplay *disp,
EGLSetBlobFuncANDROID set,
EGLGetBlobFuncANDROID get)
{
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
dri2_dpy->blob->set_cache_funcs(dri2_dpy->dri_screen,
- dpy->BlobCacheSet,
- dpy->BlobCacheGet);
+ disp->BlobCacheSet,
+ disp->BlobCacheGet);
}
static EGLint
-dri2_client_wait_sync(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync,
+dri2_client_wait_sync(_EGLDriver *drv, _EGLDisplay *disp, _EGLSync *sync,
EGLint flags, EGLTime timeout)
{
_EGLContext *ctx = _eglGetCurrentContext();
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri2_egl_context *dri2_ctx = dri2_egl_context(ctx);
struct dri2_egl_sync *dri2_sync = dri2_egl_sync(sync);
unsigned wait_flags = 0;
@@ -3167,7 +3167,7 @@ dri2_client_wait_sync(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync,
}
static EGLBoolean
-dri2_signal_sync(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync,
+dri2_signal_sync(_EGLDriver *drv, _EGLDisplay *disp, _EGLSync *sync,
EGLenum mode)
{
struct dri2_egl_sync *dri2_sync = dri2_egl_sync(sync);
@@ -3193,10 +3193,10 @@ dri2_signal_sync(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync,
}
static EGLint
-dri2_server_wait_sync(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync)
+dri2_server_wait_sync(_EGLDriver *drv, _EGLDisplay *disp, _EGLSync *sync)
{
_EGLContext *ctx = _eglGetCurrentContext();
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri2_egl_context *dri2_ctx = dri2_egl_context(ctx);
struct dri2_egl_sync *dri2_sync = dri2_egl_sync(sync);
@@ -3206,10 +3206,10 @@ dri2_server_wait_sync(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync)
}
static int
-dri2_interop_query_device_info(_EGLDisplay *dpy, _EGLContext *ctx,
+dri2_interop_query_device_info(_EGLDisplay *disp, _EGLContext *ctx,
struct mesa_glinterop_device_info *out)
{
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri2_egl_context *dri2_ctx = dri2_egl_context(ctx);
if (!dri2_dpy->interop)
@@ -3219,11 +3219,11 @@ dri2_interop_query_device_info(_EGLDisplay *dpy, _EGLContext *ctx,
}
static int
-dri2_interop_export_object(_EGLDisplay *dpy, _EGLContext *ctx,
+dri2_interop_export_object(_EGLDisplay *disp, _EGLContext *ctx,
struct mesa_glinterop_export_in *in,
struct mesa_glinterop_export_out *out)
{
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri2_egl_context *dri2_ctx = dri2_egl_context(ctx);
if (!dri2_dpy->interop)
diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h
index a9ddadf11b1..aa143deb867 100644
--- a/src/egl/drivers/dri2/egl_dri2.h
+++ b/src/egl/drivers/dri2/egl_dri2.h
@@ -87,63 +87,63 @@ struct wl_buffer;
struct dri2_egl_display_vtbl {
int (*authenticate)(_EGLDisplay *disp, uint32_t id);
- _EGLSurface* (*create_window_surface)(_EGLDriver *drv, _EGLDisplay *dpy,
+ _EGLSurface* (*create_window_surface)(_EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *config,
void *native_window,
const EGLint *attrib_list);
- _EGLSurface* (*create_pixmap_surface)(_EGLDriver *drv, _EGLDisplay *dpy,
+ _EGLSurface* (*create_pixmap_surface)(_EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *config,
void *native_pixmap,
const EGLint *attrib_list);
- _EGLSurface* (*create_pbuffer_surface)(_EGLDriver *drv, _EGLDisplay *dpy,
+ _EGLSurface* (*create_pbuffer_surface)(_EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *config,
const EGLint *attrib_list);
- EGLBoolean (*destroy_surface)(_EGLDriver *drv, _EGLDisplay *dpy,
+ EGLBoolean (*destroy_surface)(_EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surface);
- EGLBoolean (*swap_interval)(_EGLDriver *drv, _EGLDisplay *dpy,
+ EGLBoolean (*swap_interval)(_EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surf, EGLint interval);
- _EGLImage* (*create_image)(_EGLDriver *drv, _EGLDisplay *dpy,
+ _EGLImage* (*create_image)(_EGLDriver *drv, _EGLDisplay *disp,
_EGLContext *ctx, EGLenum target,
EGLClientBuffer buffer,
const EGLint *attr_list);
- EGLBoolean (*swap_buffers)(_EGLDriver *drv, _EGLDisplay *dpy,
+ EGLBoolean (*swap_buffers)(_EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surf);
- EGLBoolean (*swap_buffers_with_damage)(_EGLDriver *drv, _EGLDisplay *dpy,
+ EGLBoolean (*swap_buffers_with_damage)(_EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surface,
const EGLint *rects, EGLint n_rects);
- EGLBoolean (*set_damage_region)(_EGLDriver *drv, _EGLDisplay *dpy,
+ EGLBoolean (*set_damage_region)(_EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surface,
const EGLint *rects, EGLint n_rects);
- EGLBoolean (*swap_buffers_region)(_EGLDriver *drv, _EGLDisplay *dpy,
+ EGLBoolean (*swap_buffers_region)(_EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surf, EGLint numRects,
const EGLint *rects);
- EGLBoolean (*post_sub_buffer)(_EGLDriver *drv, _EGLDisplay *dpy,
+ EGLBoolean (*post_sub_buffer)(_EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surf,
EGLint x, EGLint y,
EGLint width, EGLint height);
- EGLBoolean (*copy_buffers)(_EGLDriver *drv, _EGLDisplay *dpy,
+ EGLBoolean (*copy_buffers)(_EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surf, void *native_pixmap_target);
- EGLint (*query_buffer_age)(_EGLDriver *drv, _EGLDisplay *dpy,
+ EGLint (*query_buffer_age)(_EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surf);
- EGLBoolean (*query_surface)(_EGLDriver *drv, _EGLDisplay *dpy,
+ EGLBoolean (*query_surface)(_EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surf, EGLint attribute,
EGLint *value);
struct wl_buffer* (*create_wayland_buffer_from_image)(
- _EGLDriver *drv, _EGLDisplay *dpy, _EGLImage *img);
+ _EGLDriver *drv, _EGLDisplay *disp, _EGLImage *img);
EGLBoolean (*get_sync_values)(_EGLDisplay *display, _EGLSurface *surface,
EGLuint64KHR *ust, EGLuint64KHR *msc,
@@ -151,12 +151,12 @@ struct dri2_egl_display_vtbl {
__DRIdrawable *(*get_dri_drawable)(_EGLSurface *surf);
- void (*close_screen_notify)(_EGLDisplay *dpy);
+ void (*close_screen_notify)(_EGLDisplay *disp);
/* Used in EGL_KHR_mutable_render_buffer to update the native window's
* shared buffer mode.
*/
- bool (*set_shared_buffer_mode)(_EGLDisplay *dpy, _EGLSurface *surf,
+ bool (*set_shared_buffer_mode)(_EGLDisplay *disp, _EGLSurface *surf,
bool mode);
};
@@ -534,7 +534,7 @@ void
dri2_egl_surface_free_local_buffers(struct dri2_egl_surface *dri2_surf);
EGLBoolean
-dri2_init_surface(_EGLSurface *surf, _EGLDisplay *dpy, EGLint type,
+dri2_init_surface(_EGLSurface *surf, _EGLDisplay *disp, EGLint type,
_EGLConfig *conf, const EGLint *attrib_list, EGLBoolean enable_out_fence);
void
diff --git a/src/egl/drivers/dri2/egl_dri2_fallbacks.h b/src/egl/drivers/dri2/egl_dri2_fallbacks.h
index 1482f17d476..6c2c4bbe595 100644
--- a/src/egl/drivers/dri2/egl_dri2_fallbacks.h
+++ b/src/egl/drivers/dri2/egl_dri2_fallbacks.h
@@ -57,17 +57,17 @@ dri2_fallback_create_image_khr(_EGLDriver *drv, _EGLDisplay *disp,
}
static inline EGLBoolean
-dri2_fallback_swap_buffers_with_damage(_EGLDriver *drv, _EGLDisplay *dpy,
+dri2_fallback_swap_buffers_with_damage(_EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surf,
const EGLint *rects, EGLint n_rects)
{
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
- dri2_dpy->vtbl->set_damage_region(drv, dpy, surf, rects, n_rects);
- return dri2_dpy->vtbl->swap_buffers(drv, dpy, surf);
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+ dri2_dpy->vtbl->set_damage_region(drv, disp, surf, rects, n_rects);
+ return dri2_dpy->vtbl->swap_buffers(drv, disp, surf);
}
static inline EGLBoolean
-dri2_fallback_swap_buffers_region(_EGLDriver *drv, _EGLDisplay *dpy,
+dri2_fallback_swap_buffers_region(_EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surf,
EGLint numRects, const EGLint *rects)
{
@@ -75,7 +75,7 @@ dri2_fallback_swap_buffers_region(_EGLDriver *drv, _EGLDisplay *dpy,
}
static inline EGLBoolean
-dri2_fallback_post_sub_buffer(_EGLDriver *drv, _EGLDisplay *dpy,
+dri2_fallback_post_sub_buffer(_EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *draw,
EGLint x, EGLint y, EGLint width, EGLint height)
{
@@ -83,7 +83,7 @@ dri2_fallback_post_sub_buffer(_EGLDriver *drv, _EGLDisplay *dpy,
}
static inline EGLBoolean
-dri2_fallback_copy_buffers(_EGLDriver *drv, _EGLDisplay *dpy,
+dri2_fallback_copy_buffers(_EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surf,
void *native_pixmap_target)
{
@@ -91,7 +91,7 @@ dri2_fallback_copy_buffers(_EGLDriver *drv, _EGLDisplay *dpy,
}
static inline EGLBoolean
-dri2_fallback_set_damage_region(_EGLDriver *drv, _EGLDisplay *dpy,
+dri2_fallback_set_damage_region(_EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surf,
const EGLint *rects, EGLint n_rects)
{
@@ -99,7 +99,7 @@ dri2_fallback_set_damage_region(_EGLDriver *drv, _EGLDisplay *dpy,
}
static inline EGLint
-dri2_fallback_query_buffer_age(_EGLDriver *drv, _EGLDisplay *dpy,
+dri2_fallback_query_buffer_age(_EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surf)
{
return 0;
@@ -107,14 +107,14 @@ dri2_fallback_query_buffer_age(_EGLDriver *drv, _EGLDisplay *dpy,
static inline struct wl_buffer*
dri2_fallback_create_wayland_buffer_from_image(_EGLDriver *drv,
- _EGLDisplay *dpy,
+ _EGLDisplay *disp,
_EGLImage *img)
{
return NULL;
}
static inline EGLBoolean
-dri2_fallback_get_sync_values(_EGLDisplay *dpy, _EGLSurface *surf,
+dri2_fallback_get_sync_values(_EGLDisplay *disp, _EGLSurface *surf,
EGLuint64KHR *ust, EGLuint64KHR *msc,
EGLuint64KHR *sbc)
{
diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c
index 366a9ec14e9..7e1d61052db 100644
--- a/src/egl/drivers/dri2/platform_android.c
+++ b/src/egl/drivers/dri2/platform_android.c
@@ -457,7 +457,7 @@ droid_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
}
static EGLBoolean
-droid_swap_interval(_EGLDriver *drv, _EGLDisplay *dpy,
+droid_swap_interval(_EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surf, EGLint interval)
{
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf);
@@ -960,7 +960,7 @@ droid_create_image_from_name(_EGLDisplay *disp, _EGLContext *ctx,
#endif /* HAVE_DRM_GRALLOC */
static EGLBoolean
-droid_query_surface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf,
+droid_query_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
EGLint attribute, EGLint *value)
{
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf);
@@ -982,7 +982,7 @@ droid_query_surface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf,
default:
break;
}
- return _eglQuerySurface(drv, dpy, surf, attribute, value);
+ return _eglQuerySurface(drv, disp, surf, attribute, value);
}
static _EGLImage *
@@ -1131,9 +1131,9 @@ droid_get_capability(void *loaderPrivate, enum dri_loader_cap cap)
}
static EGLBoolean
-droid_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *dpy)
+droid_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *disp)
{
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
static const struct {
int format;
unsigned int rgba_masks[4];
@@ -1178,7 +1178,7 @@ droid_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *dpy)
};
struct dri2_egl_config *dri2_conf =
- dri2_add_config(dpy, dri2_dpy->driver_configs[j],
+ dri2_add_config(disp, dri2_dpy->driver_configs[j],
config_count + 1, surface_type, config_attrs,
visuals[i].rgba_masks);
if (dri2_conf) {
diff --git a/src/egl/drivers/dri2/platform_surfaceless.c b/src/egl/drivers/dri2/platform_surfaceless.c
index f9809561611..0c018a35234 100644
--- a/src/egl/drivers/dri2/platform_surfaceless.c
+++ b/src/egl/drivers/dri2/platform_surfaceless.c
@@ -181,9 +181,9 @@ dri2_surfaceless_create_pbuffer_surface(_EGLDriver *drv, _EGLDisplay *disp,
}
static EGLBoolean
-surfaceless_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *dpy)
+surfaceless_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *disp)
{
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
static const struct {
const char *format_name;
unsigned int rgba_masks[4];
@@ -199,7 +199,7 @@ surfaceless_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *dpy)
for (unsigned j = 0; j < ARRAY_SIZE(visuals); j++) {
struct dri2_egl_config *dri2_conf;
- dri2_conf = dri2_add_config(dpy, dri2_dpy->driver_configs[i],
+ dri2_conf = dri2_add_config(disp, dri2_dpy->driver_configs[i],
config_count + 1, EGL_PBUFFER_BIT, NULL,
visuals[j].rgba_masks);
@@ -272,9 +272,9 @@ static const __DRIextension *swrast_loader_extensions[] = {
};
static bool
-surfaceless_probe_device(_EGLDisplay *dpy, bool swrast)
+surfaceless_probe_device(_EGLDisplay *disp, bool swrast)
{
- struct dri2_egl_display *dri2_dpy = dpy->DriverData;
+ struct dri2_egl_display *dri2_dpy = disp->DriverData;
const int limit = 64;
const int base = 128;
int fd;
@@ -304,14 +304,14 @@ surfaceless_probe_device(_EGLDisplay *dpy, bool swrast)
}
dri2_dpy->fd = fd;
- if (dri2_load_driver_dri3(dpy)) {
+ if (dri2_load_driver_dri3(disp)) {
_EGLDevice *dev = _eglAddDevice(dri2_dpy->fd, swrast);
if (!dev) {
dlclose(dri2_dpy->driver);
_eglLog(_EGL_WARNING, "DRI2: failed to find EGLDevice");
continue;
}
- dpy->Device = dev;
+ disp->Device = dev;
return true;
}
@@ -331,7 +331,7 @@ surfaceless_probe_device(_EGLDisplay *dpy, bool swrast)
return false;
}
- if (dri2_load_driver_swrast(dpy)) {
+ if (dri2_load_driver_swrast(disp)) {
dri2_dpy->loader_extensions = swrast_loader_extensions;
return true;
}
diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c
index 4684c9f0825..5d6efea6141 100644
--- a/src/egl/drivers/dri2/platform_x11.c
+++ b/src/egl/drivers/dri2/platform_x11.c
@@ -449,11 +449,11 @@ dri2_x11_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
* have.
*/
static EGLBoolean
-dri2_query_surface(_EGLDriver *drv, _EGLDisplay *dpy,
+dri2_query_surface(_EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surf, EGLint attribute,
EGLint *value)
{
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf);
int x, y, w, h;
@@ -470,7 +470,7 @@ dri2_query_surface(_EGLDriver *drv, _EGLDisplay *dpy,
default:
break;
}
- return _eglQuerySurface(drv, dpy, surf, attribute, value);
+ return _eglQuerySurface(drv, disp, surf, attribute, value);
}
/**
diff --git a/src/egl/drivers/dri2/platform_x11_dri3.c b/src/egl/drivers/dri2/platform_x11_dri3.c
index 1206cd39ae6..189212745ce 100644
--- a/src/egl/drivers/dri2/platform_x11_dri3.c
+++ b/src/egl/drivers/dri2/platform_x11_dri3.c
@@ -445,7 +445,7 @@ dri3_copy_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf,
}
static int
-dri3_query_buffer_age(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf)
+dri3_query_buffer_age(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
{
struct dri3_egl_surface *dri3_surf = dri3_egl_surface(surf);
@@ -453,7 +453,7 @@ dri3_query_buffer_age(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf)
}
static EGLBoolean
-dri3_query_surface(_EGLDriver *drv, _EGLDisplay *dpy,
+dri3_query_surface(_EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surf, EGLint attribute,
EGLint *value)
{
@@ -468,7 +468,7 @@ dri3_query_surface(_EGLDriver *drv, _EGLDisplay *dpy,
break;
}
- return _eglQuerySurface(drv, dpy, surf, attribute, value);
+ return _eglQuerySurface(drv, disp, surf, attribute, value);
}
static __DRIdrawable *
@@ -480,9 +480,9 @@ dri3_get_dri_drawable(_EGLSurface *surf)
}
static void
-dri3_close_screen_notify(_EGLDisplay *dpy)
+dri3_close_screen_notify(_EGLDisplay *disp)
{
- struct dri2_egl_display *dri2_dpy = dri2_egl_display(dpy);
+ struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
loader_dri3_close_screen(dri2_dpy->dri_screen);
}
diff --git a/src/egl/drivers/haiku/egl_haiku.cpp b/src/egl/drivers/haiku/egl_haiku.cpp
index d4b046c79b4..517c264088a 100644
--- a/src/egl/drivers/haiku/egl_haiku.cpp
+++ b/src/egl/drivers/haiku/egl_haiku.cpp
@@ -140,7 +140,7 @@ haiku_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
static EGLBoolean
-haiku_add_configs_for_visuals(_EGLDisplay *dpy)
+haiku_add_configs_for_visuals(_EGLDisplay *disp)
{
CALLED();
@@ -149,7 +149,7 @@ haiku_add_configs_for_visuals(_EGLDisplay *dpy)
if (!conf)
return _eglError(EGL_BAD_ALLOC, "haiku_add_configs_for_visuals");
- _eglInitConfig(&conf->base, dpy, 1);
+ _eglInitConfig(&conf->base, disp, 1);
TRACE("Config inited\n");
_eglSetConfigKey(&conf->base, EGL_RED_SIZE, 8);
@@ -190,7 +190,7 @@ haiku_add_configs_for_visuals(_EGLDisplay *dpy)
TRACE("Validated config\n");
_eglLinkConfig(&conf->base);
- if (!_eglGetArraySize(dpy->Configs)) {
+ if (!_eglGetArraySize(disp->Configs)) {
_eglLog(_EGL_WARNING, "Haiku: failed to create any config");
goto cleanup;
}
@@ -206,7 +206,7 @@ cleanup:
extern "C"
EGLBoolean
-init_haiku(_EGLDriver *drv, _EGLDisplay *dpy)
+init_haiku(_EGLDriver *drv, _EGLDisplay *disp)
{
_EGLDevice *dev;
CALLED();
@@ -216,13 +216,13 @@ init_haiku(_EGLDriver *drv, _EGLDisplay *dpy)
_eglError(EGL_NOT_INITIALIZED, "DRI2: failed to find EGLDevice");
return EGL_FALSE;
}
- dpy->Device = dev;
+ disp->Device = dev;
TRACE("Add configs\n");
- if (!haiku_add_configs_for_visuals(dpy))
+ if (!haiku_add_configs_for_visuals(disp))
return EGL_FALSE;
- dpy->Version = 14;
+ disp->Version = 14;
TRACE("Initialization finished\n");
@@ -232,7 +232,7 @@ init_haiku(_EGLDriver *drv, _EGLDisplay *dpy)
extern "C"
EGLBoolean
-haiku_terminate(_EGLDriver* drv,_EGLDisplay* dpy)
+haiku_terminate(_EGLDriver* drv,_EGLDisplay *disp)
{
return EGL_TRUE;
}
@@ -281,7 +281,7 @@ haiku_destroy_context(_EGLDriver* drv, _EGLDisplay *disp, _EGLContext* ctx)
extern "C"
EGLBoolean
-haiku_make_current(_EGLDriver* drv, _EGLDisplay* dpy, _EGLSurface *dsurf,
+haiku_make_current(_EGLDriver* drv, _EGLDisplay *disp, _EGLSurface *dsurf,
_EGLSurface *rsurf, _EGLContext *ctx)
{
CALLED();
@@ -302,7 +302,7 @@ haiku_make_current(_EGLDriver* drv, _EGLDisplay* dpy, _EGLSurface *dsurf,
extern "C"
EGLBoolean
-haiku_swap_buffers(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf)
+haiku_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
{
struct haiku_egl_surface* surface = haiku_egl_surface(surf);