From eaef028976d32e382c4ebcfbb8605a6f40cd22b8 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Sun, 1 Oct 2017 15:55:25 +1300 Subject: Add renderer pointer inside drm_surface --- include/backend/drm/renderer.h | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'include/backend/drm') diff --git a/include/backend/drm/renderer.h b/include/backend/drm/renderer.h index bbcf4f0c..9982c25f 100644 --- a/include/backend/drm/renderer.h +++ b/include/backend/drm/renderer.h @@ -14,6 +14,8 @@ struct wlr_drm_renderer { }; struct wlr_drm_surface { + struct wlr_drm_renderer *renderer; + uint32_t width; uint32_t height; @@ -25,23 +27,15 @@ struct wlr_drm_surface { }; bool wlr_drm_renderer_init(struct wlr_drm_renderer *renderer, int fd); - void wlr_drm_renderer_finish(struct wlr_drm_renderer *renderer); -bool wlr_drm_surface_init(struct wlr_drm_renderer *renderer, - struct wlr_drm_surface *surf, uint32_t width, uint32_t height, +bool wlr_drm_surface_init(struct wlr_drm_surface *surf, + struct wlr_drm_renderer *renderer, uint32_t width, uint32_t height, uint32_t format, uint32_t flags); -void wlr_drm_surface_finish(struct wlr_drm_renderer *renderer, - struct wlr_drm_surface *surf); - -void wlr_drm_surface_make_current(struct wlr_drm_renderer *renderer, - struct wlr_drm_surface *surf); - -struct gbm_bo *wlr_drm_surface_swap_buffers(struct wlr_drm_renderer *renderer, - struct wlr_drm_surface *surf); - -struct gbm_bo *wlr_drm_surface_get_front(struct wlr_drm_renderer *renderer, - struct wlr_drm_surface *surf); +void wlr_drm_surface_finish(struct wlr_drm_surface *surf); +void wlr_drm_surface_make_current(struct wlr_drm_surface *surf); +struct gbm_bo *wlr_drm_surface_swap_buffers(struct wlr_drm_surface *surf); +struct gbm_bo *wlr_drm_surface_get_front(struct wlr_drm_surface *surf); #endif -- cgit v1.2.3