diff options
author | Benjamin Franzke <[email protected]> | 2011-02-04 12:39:40 +0100 |
---|---|---|
committer | Benjamin Franzke <[email protected]> | 2011-02-07 14:01:31 +0100 |
commit | 93aea84f472f5f9ff588f7b2d4f7320ec43bc216 (patch) | |
tree | ebf0ca1b6da7737b566fa9581750ba97230d3422 /src/egl/drivers/dri2/egl_dri2.h | |
parent | 9630437fc9f46f48b2543ca8b6741a664bd028e3 (diff) |
egl_dri2: Add wayland platform
Diffstat (limited to 'src/egl/drivers/dri2/egl_dri2.h')
-rw-r--r-- | src/egl/drivers/dri2/egl_dri2.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h index f65319d2e9c..72e887c95b0 100644 --- a/src/egl/drivers/dri2/egl_dri2.h +++ b/src/egl/drivers/dri2/egl_dri2.h @@ -33,6 +33,11 @@ #include <xcb/xfixes.h> #include <X11/Xlib-xcb.h> +#ifdef HAVE_WAYLAND_PLATFORM +#include <wayland-client.h> +#include "wayland-egl-priv.h" +#endif + #include <GL/gl.h> #include <GL/internal/dri_interface.h> @@ -76,6 +81,9 @@ struct dri2_egl_display __DRIdri2LoaderExtension loader_extension; const __DRIextension *extensions[3]; +#ifdef HAVE_WAYLAND_PLATFORM + struct wl_egl_display *wl_dpy; +#endif }; struct dri2_egl_context @@ -84,6 +92,22 @@ struct dri2_egl_context __DRIcontext *dri_context; }; +#ifdef HAVE_WAYLAND_PLATFORM +enum wayland_buffer_type { + WL_BUFFER_FRONT, + WL_BUFFER_BACK, + WL_BUFFER_COUNT +}; + +#define __DRI_BUFFER_COUNT 10 +#endif + +enum dri2_surface_type { + DRI2_WINDOW_SURFACE, + DRI2_PIXMAP_SURFACE, + DRI2_PBUFFER_SURFACE +}; + struct dri2_egl_surface { _EGLSurface base; @@ -94,8 +118,24 @@ struct dri2_egl_surface xcb_xfixes_region_t region; int have_fake_front; int swap_interval; + enum dri2_surface_type type; +#ifdef HAVE_WAYLAND_PLATFORM + struct wl_egl_window *wl_win; + struct wl_egl_pixmap *wl_pix; + struct wl_buffer *wl_drm_buffer[WL_BUFFER_COUNT]; + int dx; + int dy; + __DRIbuffer *dri_buffers[__DRI_BUFFER_COUNT]; + EGLBoolean block_swap_buffers; +#endif }; +struct dri2_egl_buffer { + __DRIbuffer *dri_buffer; + struct dri2_egl_display *dri2_dpy; +}; + + struct dri2_egl_config { _EGLConfig base; @@ -136,6 +176,9 @@ dri2_initialize_x11(_EGLDriver *drv, _EGLDisplay *disp); EGLBoolean dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp); +EGLBoolean +dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp); + char * dri2_get_driver_for_fd(int fd); |