summaryrefslogtreecommitdiffstats
path: root/src/egl/wayland/wayland-drm/wayland-drm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/egl/wayland/wayland-drm/wayland-drm.h')
-rw-r--r--src/egl/wayland/wayland-drm/wayland-drm.h24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/egl/wayland/wayland-drm/wayland-drm.h b/src/egl/wayland/wayland-drm/wayland-drm.h
index 675a6a5ce43..4324b591425 100644
--- a/src/egl/wayland/wayland-drm/wayland-drm.h
+++ b/src/egl/wayland/wayland-drm/wayland-drm.h
@@ -8,19 +8,27 @@
struct wl_drm;
-typedef int (*authenticate_t) (_EGLDisplay *disp, uint32_t id);
+struct wayland_drm_callbacks {
+ int (*authenticate)(void *user_data, uint32_t id);
-struct wl_drm_buffer {
- struct wl_buffer buffer;
- struct wl_drm *drm;
- _EGLImage *image;
+ void *(*reference_buffer)(void *user_data, uint32_t name,
+ int32_t width, int32_t height,
+ uint32_t stride, struct wl_visual *visual);
+
+ void (*release_buffer)(void *user_data, void *buffer);
};
struct wl_drm *
-wayland_drm_init(struct wl_display *display, _EGLDisplay *disp,
- authenticate_t authenticate, char *device_name);
+wayland_drm_init(struct wl_display *display, char *device_name,
+ struct wayland_drm_callbacks *callbacks, void *user_data);
void
-wayland_drm_destroy(struct wl_drm *drm);
+wayland_drm_uninit(struct wl_drm *drm);
+
+int
+wayland_buffer_is_drm(struct wl_buffer *buffer);
+
+void *
+wayland_drm_buffer_get_buffer(struct wl_buffer *buffer);
#endif