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.
This commit is contained in:
Simon Ser 2022-09-21 10:34:04 +02:00 committed by Simon Zeni
parent f03da48491
commit c153ae3c5d
2 changed files with 88 additions and 114 deletions

View file

@ -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;