From c153ae3c5d0e330d5fe90d4db0114e2e5d792bf2 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 21 Sep 2022 10:34:04 +0200 Subject: screencopy-v1: use wlr_buffer APIs Instead of using low-level wl_shm_buffer and wlr_dmabuf_v1_buffer APIs, use the unified wlr_buffer APIs. That way it doesn't matter what the exact wlr_buffer implementation is used, any which provides the necessary capabilities (data_ptr or dmabuf) would work. Simplifies the logic a bit, and will make the transition to wlr_shm easier. --- include/wlr/types/wlr_screencopy_v1.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/wlr/types/wlr_screencopy_v1.h b/include/wlr/types/wlr_screencopy_v1.h index c74b8ecc..cec6100d 100644 --- a/include/wlr/types/wlr_screencopy_v1.h +++ b/include/wlr/types/wlr_screencopy_v1.h @@ -45,10 +45,8 @@ struct wlr_screencopy_frame_v1 { bool with_damage; - struct wl_shm_buffer *shm_buffer; - struct wlr_dmabuf_v1_buffer *dma_buffer; - - struct wl_listener buffer_destroy; + enum wlr_buffer_cap buffer_cap; + struct wlr_buffer *buffer; struct wlr_output *output; struct wl_listener output_commit; -- cgit v1.2.3