mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-18 06:47:31 -04:00
output: Nuke wlr_output->events.present
This commit is contained in:
parent
20050bddbc
commit
544e678be0
9 changed files with 12 additions and 52 deletions
|
|
@ -1718,14 +1718,12 @@ static void handle_page_flip(int fd, unsigned seq,
|
|||
/* The DRM backend guarantees that the presentation event will be for
|
||||
* the last submitted frame. */
|
||||
.output = &conn->output,
|
||||
.commit_seq = conn->output.commit_seq,
|
||||
.presented = drm->session->active,
|
||||
.when = &present_time,
|
||||
.seq = seq,
|
||||
.refresh = mhz_to_nsec(conn->output.refresh),
|
||||
.flags = present_flags,
|
||||
};
|
||||
wlr_output_send_present(&conn->output, &present_event);
|
||||
wl_signal_emit_mutable(&conn->commit.events.present, &present_event);
|
||||
|
||||
if (drm->session->active) {
|
||||
|
|
|
|||
|
|
@ -103,7 +103,6 @@ static void presentation_feedback_handle_presented(void *data,
|
|||
.tv_nsec = tv_nsec,
|
||||
};
|
||||
struct wlr_output_event_present event = {
|
||||
.commit_seq = feedback->commit_seq,
|
||||
.presented = true,
|
||||
.output = &feedback->output->wlr_output,
|
||||
.when = &t,
|
||||
|
|
@ -111,7 +110,6 @@ static void presentation_feedback_handle_presented(void *data,
|
|||
.refresh = refresh_ns,
|
||||
.flags = flags,
|
||||
};
|
||||
wlr_output_send_present(&feedback->output->wlr_output, &event);
|
||||
wl_signal_emit_mutable(&feedback->commit.events.present, &event);
|
||||
|
||||
presentation_feedback_destroy(feedback);
|
||||
|
|
@ -122,11 +120,9 @@ static void presentation_feedback_handle_discarded(void *data,
|
|||
struct wlr_wl_presentation_feedback *feedback = data;
|
||||
|
||||
struct wlr_output_event_present event = {
|
||||
.commit_seq = feedback->commit_seq,
|
||||
.presented = false,
|
||||
.output = &feedback->output->wlr_output,
|
||||
};
|
||||
wlr_output_send_present(&feedback->output->wlr_output, &event);
|
||||
wl_signal_emit_mutable(&feedback->commit.events.present, &event);
|
||||
|
||||
presentation_feedback_destroy(feedback);
|
||||
|
|
@ -588,7 +584,6 @@ static struct wlr_output_commit *output_commit(struct wlr_output *wlr_output,
|
|||
}
|
||||
feedback->output = output;
|
||||
feedback->feedback = wp_feedback;
|
||||
feedback->commit_seq = output->wlr_output.commit_seq + 1;
|
||||
wl_list_insert(&output->presentation_feedbacks, &feedback->link);
|
||||
|
||||
wp_presentation_feedback_add_listener(wp_feedback,
|
||||
|
|
|
|||
|
|
@ -383,7 +383,7 @@ static struct wlr_output_commit *output_commit(struct wlr_output *wlr_output,
|
|||
}
|
||||
}
|
||||
|
||||
uint32_t serial = output->wlr_output.commit_seq;
|
||||
uint32_t serial = output->serial++;
|
||||
|
||||
wlr_output_commit_init(&commit->commit, wlr_output);
|
||||
wl_list_insert(&output->commits, &commit->link);
|
||||
|
|
@ -754,13 +754,11 @@ void handle_x11_present_event(struct wlr_x11_backend *x11,
|
|||
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,
|
||||
};
|
||||
wlr_output_send_present(&output->wlr_output, &present_event);
|
||||
wl_signal_emit_mutable(&commit->commit.events.present, &present_event);
|
||||
|
||||
wl_list_remove(&commit->link);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue