#ifndef vl_winsys_h
#define vl_winsys_h
+#ifdef HAVE_X11_PLATFORM
#include <X11/Xlib.h>
+#endif
#include "pipe/p_defines.h"
#include "pipe/p_format.h"
void *
(*get_private)(struct vl_screen *vscreen);
+ void
+ (*set_back_texture_from_output)(struct vl_screen *vscreen,
+ struct pipe_resource *buffer,
+ uint32_t width, uint32_t height);
+
struct pipe_screen *pscreen;
struct pipe_loader_device *dev;
-};
-
-void vl_screen_destroy(struct vl_screen *vscreen);
-
-struct pipe_resource*
-vl_screen_texture_from_drawable(struct vl_screen *vscreen, void *drawable);
-
-struct u_rect *
-vl_screen_get_dirty_area(struct vl_screen *vscreen);
-
-uint64_t
-vl_screen_get_timestamp(struct vl_screen *vscreen, void *drawable);
-void
-vl_screen_set_next_timestamp(struct vl_screen *vscreen, uint64_t stamp);
+ void *xcb_screen;
+ uint32_t color_depth;
+};
-void*
-vl_screen_get_private(struct vl_screen *vscreen);
+#ifdef HAVE_X11_PLATFORM
+uint32_t
+vl_dri2_format_for_depth(struct vl_screen *vscreen, int depth);
-struct vl_screen*
+struct vl_screen *
vl_dri2_screen_create(Display *display, int screen);
+#else
+static inline struct vl_screen *
+vl_dri2_screen_create(void *display, int screen) { return NULL; };
+#endif
+#if defined(HAVE_X11_PLATFORM) && defined(HAVE_DRI3)
+struct vl_screen *
+vl_dri3_screen_create(Display *display, int screen);
+#else
+static inline struct vl_screen *
+vl_dri3_screen_create(void *display, int screen) { return NULL; };
+#endif
+
+#ifdef HAVE_DRM_PLATFORM
struct vl_screen *
vl_drm_screen_create(int fd);
+#else
+static inline struct vl_screen *
+vl_drm_screen_create(int fd) { return NULL; };
+#endif
#endif