dri2_dpy->image->destroyImage(buffer->driver_buffer);
}
-static struct wayland_drm_callbacks wl_drm_callbacks = {
- .authenticate = NULL,
- .reference_buffer = dri2_wl_reference_buffer,
- .release_buffer = dri2_wl_release_buffer
-};
-
static EGLBoolean
dri2_bind_wayland_display_wl(_EGLDriver *drv, _EGLDisplay *disp,
struct wl_display *wl_dpy)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
+ const struct wayland_drm_callbacks wl_drm_callbacks = {
+ .authenticate = (int(*)(void *, uint32_t)) dri2_dpy->vtbl->authenticate;
+ .reference_buffer = dri2_wl_reference_buffer,
+ .release_buffer = dri2_wl_release_buffer
+ };
int flags = 0;
uint64_t cap;
if (dri2_dpy->wl_server_drm)
return EGL_FALSE;
- wl_drm_callbacks.authenticate =
- (int(*)(void *, uint32_t)) dri2_dpy->vtbl->authenticate;
-
if (drmGetCap(dri2_dpy->fd, DRM_CAP_PRIME, &cap) == 0 &&
cap == (DRM_PRIME_CAP_IMPORT | DRM_PRIME_CAP_EXPORT) &&
dri2_dpy->image->base.version >= 7 &&
char *device_name;
uint32_t flags;
- struct wayland_drm_callbacks *callbacks;
+ const struct wayland_drm_callbacks *callbacks;
struct wl_buffer_interface buffer_interface;
};
struct wl_drm *
wayland_drm_init(struct wl_display *display, char *device_name,
- struct wayland_drm_callbacks *callbacks, void *user_data,
+ const struct wayland_drm_callbacks *callbacks, void *user_data,
uint32_t flags)
{
struct wl_drm *drm;