From: Eric Engestrom Date: Fri, 10 Jul 2020 22:29:17 +0000 (+0200) Subject: egl: inline fallback for create_pixmap_surface X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=179e442f7a440273a06e148e0793fe110c0b3e64;p=mesa.git egl: inline fallback for create_pixmap_surface Signed-off-by: Eric Engestrom Reviewed-by: Frank Binns Reviewed-by: Emil Velikov Part-of: --- diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index 5baa0c9b647..659e00c8df9 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -1895,6 +1895,8 @@ dri2_create_pixmap_surface(_EGLDriver *drv, _EGLDisplay *disp, const EGLint *attrib_list) { struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp); + if (!dri2_dpy->vtbl->create_pixmap_surface) + return NULL; return dri2_dpy->vtbl->create_pixmap_surface(drv, disp, conf, native_pixmap, attrib_list); } diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h index 38fa7c6a474..56342e13295 100644 --- a/src/egl/drivers/dri2/egl_dri2.h +++ b/src/egl/drivers/dri2/egl_dri2.h @@ -95,6 +95,7 @@ struct dri2_egl_display_vtbl { void *native_window, const EGLint *attrib_list); + /* optional */ _EGLSurface* (*create_pixmap_surface)(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *config, void *native_pixmap, diff --git a/src/egl/drivers/dri2/egl_dri2_fallbacks.h b/src/egl/drivers/dri2/egl_dri2_fallbacks.h index d975b7a8b13..3c5f82d8140 100644 --- a/src/egl/drivers/dri2/egl_dri2_fallbacks.h +++ b/src/egl/drivers/dri2/egl_dri2_fallbacks.h @@ -30,15 +30,6 @@ struct wl_buffer; -static inline _EGLSurface * -dri2_fallback_create_pixmap_surface(_EGLDriver *drv, _EGLDisplay *disp, - _EGLConfig *conf, - void *native_pixmap, - const EGLint *attrib_list) -{ - return NULL; -} - static inline _EGLSurface * dri2_fallback_create_pbuffer_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf, diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c index b72ee047944..1d9aebc95b6 100644 --- a/src/egl/drivers/dri2/platform_android.c +++ b/src/egl/drivers/dri2/platform_android.c @@ -1262,7 +1262,6 @@ droid_add_configs_for_visuals(_EGLDriver *drv, _EGLDisplay *disp) 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, .create_pbuffer_surface = droid_create_pbuffer_surface, .destroy_surface = droid_destroy_surface, .create_image = droid_create_image_khr, diff --git a/src/egl/drivers/dri2/platform_device.c b/src/egl/drivers/dri2/platform_device.c index 7380a6d75c4..80035afdc5f 100644 --- a/src/egl/drivers/dri2/platform_device.c +++ b/src/egl/drivers/dri2/platform_device.c @@ -183,7 +183,6 @@ dri2_device_create_pbuffer_surface(_EGLDriver *drv, _EGLDisplay *disp, } static const struct dri2_egl_display_vtbl dri2_device_display_vtbl = { - .create_pixmap_surface = dri2_fallback_create_pixmap_surface, .create_pbuffer_surface = dri2_device_create_pbuffer_surface, .destroy_surface = device_destroy_surface, .create_image = dri2_create_image_khr, diff --git a/src/egl/drivers/dri2/platform_surfaceless.c b/src/egl/drivers/dri2/platform_surfaceless.c index 8d37e8e9f4f..2a01c045575 100644 --- a/src/egl/drivers/dri2/platform_surfaceless.c +++ b/src/egl/drivers/dri2/platform_surfaceless.c @@ -177,7 +177,6 @@ dri2_surfaceless_create_pbuffer_surface(_EGLDriver *drv, _EGLDisplay *disp, } 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, .create_image = dri2_create_image_khr,