char *device_name;
uint32_t flags;
- struct wayland_drm_callbacks *callbacks;
+ struct wayland_drm_callbacks callbacks;
struct wl_buffer_interface buffer_interface;
};
struct wl_drm_buffer *buffer = wl_resource_get_user_data(resource);
struct wl_drm *drm = buffer->drm;
- drm->callbacks->release_buffer(drm->user_data, buffer);
+ drm->callbacks.release_buffer(drm->user_data, buffer);
free(buffer);
}
buffer->offset[2] = offset2;
buffer->stride[2] = stride2;
- drm->callbacks->reference_buffer(drm->user_data, name, fd, buffer);
+ drm->callbacks.reference_buffer(drm->user_data, name, fd, buffer);
if (buffer->driver_buffer == NULL) {
wl_resource_post_error(resource,
WL_DRM_ERROR_INVALID_NAME,
{
struct wl_drm *drm = wl_resource_get_user_data(resource);
- if (drm->callbacks->authenticate(drm->user_data, id) < 0)
+ if (drm->callbacks.authenticate(drm->user_data, id) < 0)
wl_resource_post_error(resource,
WL_DRM_ERROR_AUTHENTICATE_FAIL,
"authenicate failed");
drm->display = display;
drm->device_name = strdup(device_name);
- drm->callbacks = callbacks;
+ drm->callbacks = *callbacks;
drm->user_data = user_data;
drm->flags = flags;