wlr_output: Introduce struct wlr_output_commit

This commit is contained in:
Alexander Orzechowski 2023-10-03 05:40:50 -04:00
parent 1b0694b794
commit c299c13d13
12 changed files with 145 additions and 49 deletions

View file

@ -133,6 +133,7 @@ struct wlr_drm_connector_state {
struct wlr_drm_connector {
struct wlr_output output; // only valid if status != DISCONNECTED
struct wlr_output_commit commit;
struct wlr_drm_backend *backend;
char name[24];
@ -175,7 +176,7 @@ void scan_drm_connectors(struct wlr_drm_backend *state,
void scan_drm_leases(struct wlr_drm_backend *drm);
int handle_drm_event(int fd, uint32_t mask, void *data);
void destroy_drm_connector(struct wlr_drm_connector *conn);
bool drm_connector_commit_state(struct wlr_drm_connector *conn,
struct wlr_output_commit *drm_connector_commit_state(struct wlr_drm_connector *conn,
const struct wlr_output_state *state);
bool drm_connector_is_cursor_visible(struct wlr_drm_connector *conn);
bool drm_connector_supports_vrr(struct wlr_drm_connector *conn);

View file

@ -16,6 +16,7 @@ struct wlr_headless_backend {
struct wlr_headless_output {
struct wlr_output wlr_output;
struct wlr_output_commit commit;
struct wlr_headless_backend *backend;
struct wl_list link;

View file

@ -62,8 +62,10 @@ struct wlr_wl_buffer {
};
struct wlr_wl_presentation_feedback {
struct wlr_output_commit commit;
struct wlr_wl_output *output;
struct wl_list link;
struct wl_list link; // wlr_wl_output.presentation_feedbacks
struct wp_presentation_feedback *feedback;
uint32_t commit_seq;
};
@ -80,8 +82,11 @@ struct wlr_wl_output_layer {
struct wlr_wl_output {
struct wlr_output wlr_output;
// commit used when output is disabled or presentation events are not supported
struct wlr_output_commit commit;
struct wlr_wl_backend *backend;
struct wl_list link;
struct wl_list link; // wlr_wl_backend.outputs
struct wl_surface *surface;
bool own_surface;
@ -89,7 +94,7 @@ struct wlr_wl_output {
struct xdg_surface *xdg_surface;
struct xdg_toplevel *xdg_toplevel;
struct zxdg_toplevel_decoration_v1 *zxdg_toplevel_decoration_v1;
struct wl_list presentation_feedbacks;
struct wl_list presentation_feedbacks; // wlr_wl_presentation_feedback.link
bool configured;
uint32_t enter_serial;

View file

@ -27,6 +27,12 @@
struct wlr_x11_backend;
struct wlr_x11_output_commit {
struct wl_list link; // wlr_x11_output::commits;
uint32_t serial;
struct wlr_output_commit commit;
};
struct wlr_x11_output {
struct wlr_output wlr_output;
struct wlr_x11_backend *x11;
@ -50,6 +56,8 @@ struct wlr_x11_output {
struct wlr_swapchain *swapchain;
xcb_render_picture_t pic;
} cursor;
struct wl_list commits; // wlr_x11_output_commit::link
};
struct wlr_x11_touchpoint {