_EGLImage *img)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+ if (!dri2_dpy->vtbl->create_wayland_buffer_from_image)
+ return NULL;
return dri2_dpy->vtbl->create_wayland_buffer_from_image(drv, disp, img);
}
_EGLSurface *surf, EGLint attribute,
EGLint *value);
+ /* optional */
struct wl_buffer* (*create_wayland_buffer_from_image)(
_EGLDriver *drv, _EGLDisplay *disp, _EGLImage *img);
#include "eglcurrent.h"
#include "egltypedefs.h"
-struct wl_buffer;
-
-static inline struct wl_buffer*
-dri2_fallback_create_wayland_buffer_from_image(_EGLDriver *drv,
- _EGLDisplay *disp,
- _EGLImage *img)
-{
- return NULL;
-}
-
static inline EGLBoolean
dri2_fallback_get_sync_values(_EGLDisplay *disp, _EGLSurface *surf,
EGLuint64KHR *ust, EGLuint64KHR *msc,
.swap_interval = droid_swap_interval,
.query_buffer_age = droid_query_buffer_age,
.query_surface = droid_query_surface,
- .create_wayland_buffer_from_image = dri2_fallback_create_wayland_buffer_from_image,
.get_sync_values = dri2_fallback_get_sync_values,
.get_dri_drawable = dri2_surface_get_dri_drawable,
.set_shared_buffer_mode = droid_set_shared_buffer_mode,
.create_pbuffer_surface = dri2_device_create_pbuffer_surface,
.destroy_surface = device_destroy_surface,
.create_image = dri2_create_image_khr,
- .create_wayland_buffer_from_image = dri2_fallback_create_wayland_buffer_from_image,
.get_sync_values = dri2_fallback_get_sync_values,
.get_dri_drawable = dri2_surface_get_dri_drawable,
};
.create_image = dri2_drm_create_image_khr,
.swap_buffers = dri2_drm_swap_buffers,
.query_buffer_age = dri2_drm_query_buffer_age,
- .create_wayland_buffer_from_image = dri2_fallback_create_wayland_buffer_from_image,
.get_sync_values = dri2_fallback_get_sync_values,
.get_dri_drawable = dri2_surface_get_dri_drawable,
};
.create_pbuffer_surface = dri2_surfaceless_create_pbuffer_surface,
.destroy_surface = surfaceless_destroy_surface,
.create_image = dri2_create_image_khr,
- .create_wayland_buffer_from_image = dri2_fallback_create_wayland_buffer_from_image,
.get_sync_values = dri2_fallback_get_sync_values,
.get_dri_drawable = dri2_surface_get_dri_drawable,
};
.destroy_surface = dri2_wl_destroy_surface,
.create_image = dri2_create_image_khr,
.swap_buffers = dri2_wl_swrast_swap_buffers,
- .create_wayland_buffer_from_image = dri2_fallback_create_wayland_buffer_from_image,
.get_sync_values = dri2_fallback_get_sync_values,
.get_dri_drawable = dri2_surface_get_dri_drawable,
};
.swap_buffers = dri2_x11_swap_buffers,
/* XXX: should really implement this since X11 has pixmaps */
.query_surface = dri2_query_surface,
- .create_wayland_buffer_from_image = dri2_fallback_create_wayland_buffer_from_image,
.get_sync_values = dri2_fallback_get_sync_values,
.get_dri_drawable = dri2_surface_get_dri_drawable,
};
.post_sub_buffer = dri2_x11_post_sub_buffer,
.copy_buffers = dri2_x11_copy_buffers,
.query_surface = dri2_query_surface,
- .create_wayland_buffer_from_image = dri2_fallback_create_wayland_buffer_from_image,
.get_sync_values = dri2_x11_get_sync_values,
.get_dri_drawable = dri2_surface_get_dri_drawable,
};
.copy_buffers = dri3_copy_buffers,
.query_buffer_age = dri3_query_buffer_age,
.query_surface = dri3_query_surface,
- .create_wayland_buffer_from_image = dri2_fallback_create_wayland_buffer_from_image,
.get_sync_values = dri3_get_sync_values,
.get_dri_drawable = dri3_get_dri_drawable,
.close_screen_notify = dri3_close_screen_notify,