[Mesa-dev] [PATCH 3/3] egl: annotate dri2_egl_display_vtbl as const data
Eric Engestrom
eric.engestrom at imgtec.com
Mon May 15 15:40:18 UTC 2017
On Monday, 2017-05-15 16:14:17 +0100, Emil Velikov wrote:
> From: Emil Velikov <emil.velikov at collabora.com>
>
> With the final place that modifies the vtbl removed as of last commit we
> can annotate the symbols accordingly.
>
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
Nice! Series is:
Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>
> ---
> src/egl/drivers/dri2/platform_android.c | 2 +-
> src/egl/drivers/dri2/platform_drm.c | 2 +-
> src/egl/drivers/dri2/platform_surfaceless.c | 2 +-
> src/egl/drivers/dri2/platform_wayland.c | 4 ++--
> src/egl/drivers/dri2/platform_x11.c | 4 ++--
> 5 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c
> index 49cbeb4698e..a8d1c897f55 100644
> --- a/src/egl/drivers/dri2/platform_android.c
> +++ b/src/egl/drivers/dri2/platform_android.c
> @@ -1045,7 +1045,7 @@ droid_open_device(struct dri2_egl_display *dri2_dpy)
> return (fd >= 0) ? fcntl(fd, F_DUPFD_CLOEXEC, 3) : -1;
> }
>
> -static struct dri2_egl_display_vtbl droid_display_vtbl = {
> +static const struct dri2_egl_display_vtbl droid_display_vtbl = {
> .authenticate = NULL,
> .create_window_surface = droid_create_window_surface,
> .create_pixmap_surface = dri2_fallback_create_pixmap_surface,
> diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c
> index 9431d95e0a7..f2714a5d605 100644
> --- a/src/egl/drivers/dri2/platform_drm.c
> +++ b/src/egl/drivers/dri2/platform_drm.c
> @@ -646,7 +646,7 @@ drm_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *disp)
> return (count != 0);
> }
>
> -static struct dri2_egl_display_vtbl dri2_drm_display_vtbl = {
> +static const struct dri2_egl_display_vtbl dri2_drm_display_vtbl = {
> .authenticate = dri2_drm_authenticate,
> .create_window_surface = dri2_drm_create_window_surface,
> .create_pixmap_surface = dri2_drm_create_pixmap_surface,
> diff --git a/src/egl/drivers/dri2/platform_surfaceless.c b/src/egl/drivers/dri2/platform_surfaceless.c
> index 7e887de09da..30279737c66 100644
> --- a/src/egl/drivers/dri2/platform_surfaceless.c
> +++ b/src/egl/drivers/dri2/platform_surfaceless.c
> @@ -228,7 +228,7 @@ surfaceless_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *dpy)
> return (count != 0);
> }
>
> -static struct dri2_egl_display_vtbl dri2_surfaceless_display_vtbl = {
> +static const struct dri2_egl_display_vtbl dri2_surfaceless_display_vtbl = {
> .create_pixmap_surface = dri2_fallback_create_pixmap_surface,
> .create_pbuffer_surface = dri2_surfaceless_create_pbuffer_surface,
> .destroy_surface = surfaceless_destroy_surface,
> diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
> index c4e9d5948c0..aca6d2dbbac 100644
> --- a/src/egl/drivers/dri2/platform_wayland.c
> +++ b/src/egl/drivers/dri2/platform_wayland.c
> @@ -1044,7 +1044,7 @@ dri2_wl_setup_swap_interval(struct dri2_egl_display *dri2_dpy)
> }
> }
>
> -static struct dri2_egl_display_vtbl dri2_wl_display_vtbl = {
> +static const struct dri2_egl_display_vtbl dri2_wl_display_vtbl = {
> .authenticate = dri2_wl_authenticate,
> .create_window_surface = dri2_wl_create_window_surface,
> .create_pixmap_surface = dri2_wl_create_pixmap_surface,
> @@ -1746,7 +1746,7 @@ static const struct wl_registry_listener registry_listener_swrast = {
> .global_remove = registry_handle_global_remove
> };
>
> -static struct dri2_egl_display_vtbl dri2_wl_swrast_display_vtbl = {
> +static const struct dri2_egl_display_vtbl dri2_wl_swrast_display_vtbl = {
> .authenticate = NULL,
> .create_window_surface = dri2_wl_create_window_surface,
> .create_pixmap_surface = dri2_wl_create_pixmap_surface,
> diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c
> index 3bce0bb3f21..e512dcb234e 100644
> --- a/src/egl/drivers/dri2/platform_x11.c
> +++ b/src/egl/drivers/dri2/platform_x11.c
> @@ -1135,7 +1135,7 @@ dri2_x11_get_sync_values(_EGLDisplay *display, _EGLSurface *surface,
> return EGL_TRUE;
> }
>
> -static struct dri2_egl_display_vtbl dri2_x11_swrast_display_vtbl = {
> +static const struct dri2_egl_display_vtbl dri2_x11_swrast_display_vtbl = {
> .authenticate = NULL,
> .create_window_surface = dri2_x11_create_window_surface,
> .create_pixmap_surface = dri2_x11_create_pixmap_surface,
> @@ -1154,7 +1154,7 @@ static struct dri2_egl_display_vtbl dri2_x11_swrast_display_vtbl = {
> .get_dri_drawable = dri2_surface_get_dri_drawable,
> };
>
> -static struct dri2_egl_display_vtbl dri2_x11_display_vtbl = {
> +static const struct dri2_egl_display_vtbl dri2_x11_display_vtbl = {
> .authenticate = dri2_x11_authenticate,
> .create_window_surface = dri2_x11_create_window_surface,
> .create_pixmap_surface = dri2_x11_create_pixmap_surface,
> --
> 2.12.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list