aboutsummaryrefslogtreecommitdiff
path: root/include/backend/drm
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-06-01 19:49:51 +0200
committerSimon Ser <contact@emersion.fr>2020-11-15 22:48:42 +0100
commitef846a883950e59f95507daa6d3f96f0e84da3af (patch)
tree3a02b604139b1f08b7ac60050b7bec022517aa58 /include/backend/drm
parent1245730ea238942694db3e54d0eaaf8c6bd05818 (diff)
backend/drm: use wlr_swapchain
Diffstat (limited to 'include/backend/drm')
-rw-r--r--include/backend/drm/renderer.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/include/backend/drm/renderer.h b/include/backend/drm/renderer.h
index bfccf9d5..8cc4b0de 100644
--- a/include/backend/drm/renderer.h
+++ b/include/backend/drm/renderer.h
@@ -20,6 +20,7 @@ struct wlr_drm_renderer {
uint32_t gbm_format;
struct wlr_renderer *wlr_rend;
+ struct wlr_gbm_allocator *allocator;
};
struct wlr_drm_surface {
@@ -28,8 +29,8 @@ struct wlr_drm_surface {
uint32_t width;
uint32_t height;
- struct gbm_surface *gbm;
- EGLSurface egl;
+ struct wlr_swapchain *swapchain;
+ struct wlr_buffer *back_buffer;
};
enum wlr_drm_fb_type {
@@ -45,10 +46,7 @@ struct wlr_drm_fb {
struct wlr_drm_surface *mgpu_surf;
struct gbm_bo *mgpu_bo;
- union {
- struct wlr_drm_surface *surf;
- struct wlr_buffer *wlr_buf;
- };
+ struct wlr_buffer *wlr_buf;
};
bool init_drm_renderer(struct wlr_drm_backend *drm,
@@ -56,6 +54,7 @@ bool init_drm_renderer(struct wlr_drm_backend *drm,
void finish_drm_renderer(struct wlr_drm_renderer *renderer);
bool drm_surface_make_current(struct wlr_drm_surface *surf, int *buffer_age);
+void drm_surface_unset_current(struct wlr_drm_surface *surf);
bool export_drm_bo(struct gbm_bo *bo, struct wlr_dmabuf_attributes *attribs);
void drm_fb_clear(struct wlr_drm_fb *fb);