mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
types/wlr_output: removing the useless pointer
This commit is contained in:
parent
cf93d31736
commit
43554c1966
6 changed files with 14 additions and 21 deletions
|
|
@ -2062,16 +2062,15 @@ static void handle_page_flip(int fd, unsigned seq,
|
|||
present_flags |= WLR_OUTPUT_PRESENT_ZERO_COPY;
|
||||
}
|
||||
|
||||
struct timespec present_time = {
|
||||
.tv_sec = tv_sec,
|
||||
.tv_nsec = tv_usec * 1000,
|
||||
};
|
||||
struct wlr_output_event_present present_event = {
|
||||
/* The DRM backend guarantees that the presentation event will be for
|
||||
* the last submitted frame. */
|
||||
.commit_seq = conn->output.commit_seq,
|
||||
.presented = drm->session->active,
|
||||
.when = &present_time,
|
||||
.when = {
|
||||
.tv_sec = tv_sec,
|
||||
.tv_nsec = tv_usec * 1000,
|
||||
},
|
||||
.seq = seq,
|
||||
.refresh = mhz_to_nsec(conn->refresh),
|
||||
.flags = present_flags,
|
||||
|
|
|
|||
|
|
@ -94,14 +94,13 @@ static void presentation_feedback_handle_presented(void *data,
|
|||
uint32_t seq_hi, uint32_t seq_lo, uint32_t flags) {
|
||||
struct wlr_wl_presentation_feedback *feedback = data;
|
||||
|
||||
struct timespec t = {
|
||||
.tv_sec = ((uint64_t)tv_sec_hi << 32) | tv_sec_lo,
|
||||
.tv_nsec = tv_nsec,
|
||||
};
|
||||
struct wlr_output_event_present event = {
|
||||
.commit_seq = feedback->commit_seq,
|
||||
.presented = true,
|
||||
.when = &t,
|
||||
.when = {
|
||||
.tv_sec = ((uint64_t)tv_sec_hi << 32) | tv_sec_lo,
|
||||
.tv_nsec = tv_nsec,
|
||||
},
|
||||
.seq = ((uint64_t)seq_hi << 32) | seq_lo,
|
||||
.refresh = refresh_ns,
|
||||
.flags = flags,
|
||||
|
|
|
|||
|
|
@ -747,9 +747,6 @@ void handle_x11_present_event(struct wlr_x11_backend *x11,
|
|||
|
||||
output->last_msc = complete_notify->msc;
|
||||
|
||||
struct timespec t;
|
||||
timespec_from_nsec(&t, complete_notify->ust * 1000);
|
||||
|
||||
uint32_t flags = 0;
|
||||
if (complete_notify->mode == XCB_PRESENT_COMPLETE_MODE_FLIP) {
|
||||
flags |= WLR_OUTPUT_PRESENT_ZERO_COPY;
|
||||
|
|
@ -760,10 +757,10 @@ void handle_x11_present_event(struct wlr_x11_backend *x11,
|
|||
.output = &output->wlr_output,
|
||||
.commit_seq = complete_notify->serial,
|
||||
.presented = presented,
|
||||
.when = &t,
|
||||
.seq = complete_notify->msc,
|
||||
.flags = flags,
|
||||
};
|
||||
timespec_from_nsec(&present_event.when, complete_notify->ust * 1000);
|
||||
wlr_output_send_present(&output->wlr_output, &present_event);
|
||||
|
||||
wlr_output_send_frame(&output->wlr_output);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue