Commit 54fa5ece authored by Eric Engestrom's avatar Eric Engestrom 💤
Browse files

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's avatarEric Engestrom <eric.engestrom@intel.com>
Acked-by: Emil Velikov's avatarEmil Velikov <emil.velikov@collabora.com>
Acked-by: Emma Anholt's avatarEric Anholt <eric@anholt.net>
parent a81d5587
......@@ -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)
......
......@@ -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
......
......@@ -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)
{
......
......@@ -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)
};