From afe7b207d5ff630d85c0d428ab7234f6740cfc0c Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 29 Apr 2019 23:25:47 +0300 Subject: output: fix attach_buffer semantics --- include/backend/drm/drm.h | 2 ++ include/wlr/types/wlr_output.h | 9 +++++++++ 2 files changed, 11 insertions(+) (limited to 'include') diff --git a/include/backend/drm/drm.h b/include/backend/drm/drm.h index ba08449a..a20002b0 100644 --- a/include/backend/drm/drm.h +++ b/include/backend/drm/drm.h @@ -148,6 +148,8 @@ struct wlr_drm_connector { bool pageflip_pending; struct wl_event_source *retry_pageflip; struct wl_list link; + + struct wlr_dmabuf_attributes pending_dmabuf; }; struct wlr_drm_backend *get_drm_backend_from_backend( diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h index ffe13fb8..cd05cfb4 100644 --- a/include/wlr/types/wlr_output.h +++ b/include/wlr/types/wlr_output.h @@ -52,12 +52,21 @@ enum wlr_output_state_field { WLR_OUTPUT_STATE_DAMAGE = 1 << 1, }; +enum wlr_output_state_buffer_type { + WLR_OUTPUT_STATE_BUFFER_RENDER, + WLR_OUTPUT_STATE_BUFFER_SCANOUT, +}; + /** * Holds the double-buffered output state. */ struct wlr_output_state { uint32_t committed; // enum wlr_output_state_field pixman_region32_t damage; // output-buffer-local coordinates + + // only valid if WLR_OUTPUT_STATE_BUFFER + enum wlr_output_state_buffer_type buffer_type; + struct wlr_buffer *buffer; // if WLR_OUTPUT_STATE_BUFFER_SCANOUT }; struct wlr_output_impl; -- cgit v1.2.3