output: add wlr_output_event_commit.buffer

This allows output commit listeners to access the newly committed
buffer. Currently wlr_output.front_buffer is used but it'll get
removed in the next commit.
master
Simon Ser 3 years ago committed by Simon Zeni
parent 7201aae3d6
commit f016eca97c

@ -211,6 +211,7 @@ struct wlr_output_event_commit {
struct wlr_output *output; struct wlr_output *output;
uint32_t committed; // bitmask of enum wlr_output_state_field uint32_t committed; // bitmask of enum wlr_output_state_field
struct timespec *when; struct timespec *when;
struct wlr_buffer *buffer; // NULL if no buffer is committed
}; };
enum wlr_output_present_flag { enum wlr_output_present_flag {

@ -743,6 +743,7 @@ bool wlr_output_commit(struct wlr_output *output) {
.output = output, .output = output,
.committed = committed, .committed = committed,
.when = &now, .when = &now,
.buffer = back_buffer,
}; };
wlr_signal_emit_safe(&output->events.commit, &event); wlr_signal_emit_safe(&output->events.commit, &event);

Loading…
Cancel
Save