summaryrefslogtreecommitdiffstats
path: root/src/egl/wayland/wayland-drm/wayland-drm.h
diff options
context:
space:
mode:
authorBenjamin Franzke <[email protected]>2011-04-30 11:17:01 +0200
committerKristian Høgsberg <[email protected]>2011-05-06 10:33:50 -0400
commit834b84149d99526e4e7a3cfa6ba9fe81e5fb9eda (patch)
tree8f55be2305cf4fa8727c7aec72d30333916e2dcf /src/egl/wayland/wayland-drm/wayland-drm.h
parenta3e2c8f31f0c5d8d5c1c76e33a572c7be8938573 (diff)
egl/wayland-drm: Generalize interface
Do not depend on _EGLDisplay and _EGLImage.
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