mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-03 09:01:40 -05:00
output: add presented flag to presentation event
This commit is contained in:
parent
1089b7b8d6
commit
2af8cc769a
6 changed files with 11 additions and 2 deletions
|
|
@ -1465,6 +1465,7 @@ static void handle_page_flip(int fd, unsigned seq,
|
|||
/* The DRM backend guarantees that the presentation event will be for
|
||||
* the last submitted frame. */
|
||||
.commit_seq = conn->output.commit_seq,
|
||||
.presented = true,
|
||||
.when = &present_time,
|
||||
.seq = seq,
|
||||
.refresh = mhz_to_nsec(conn->output.refresh),
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ static bool output_commit(struct wlr_output *wlr_output) {
|
|||
if (wlr_output->pending.committed & WLR_OUTPUT_STATE_BUFFER) {
|
||||
struct wlr_output_event_present present_event = {
|
||||
.commit_seq = wlr_output->commit_seq + 1,
|
||||
.presented = true,
|
||||
};
|
||||
wlr_output_send_present(wlr_output, &present_event);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ static void presentation_feedback_handle_presented(void *data,
|
|||
};
|
||||
struct wlr_output_event_present event = {
|
||||
.commit_seq = feedback->commit_seq,
|
||||
.presented = true,
|
||||
.when = &t,
|
||||
.seq = ((uint64_t)seq_hi << 32) | seq_lo,
|
||||
.refresh = refresh_ns,
|
||||
|
|
@ -91,6 +92,7 @@ static void presentation_feedback_handle_discarded(void *data,
|
|||
|
||||
struct wlr_output_event_present event = {
|
||||
.commit_seq = feedback->commit_seq,
|
||||
.presented = false,
|
||||
};
|
||||
wlr_output_send_present(&feedback->output->wlr_output, &event);
|
||||
|
||||
|
|
@ -350,6 +352,7 @@ static bool output_commit(struct wlr_output *wlr_output) {
|
|||
} else {
|
||||
struct wlr_output_event_present present_event = {
|
||||
.commit_seq = wlr_output->commit_seq + 1,
|
||||
.presented = true,
|
||||
};
|
||||
wlr_output_send_present(wlr_output, &present_event);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -690,9 +690,11 @@ void handle_x11_present_event(struct wlr_x11_backend *x11,
|
|||
flags |= WLR_OUTPUT_PRESENT_ZERO_COPY;
|
||||
}
|
||||
|
||||
bool presented = complete_notify->mode != XCB_PRESENT_COMPLETE_MODE_SKIP;
|
||||
struct wlr_output_event_present present_event = {
|
||||
.output = &output->wlr_output,
|
||||
.commit_seq = complete_notify->serial,
|
||||
.presented = presented,
|
||||
.when = &t,
|
||||
.seq = complete_notify->msc,
|
||||
.flags = flags,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue