mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-22 10:08:10 +02:00
backend-headless: use weston_output_arm_frame_timer()
headless_output_repaint() is not actually called immediately after weston_output_finish_frame(): Weston waits for "frame-duration - repaint-window" but at least one millisecond. And renderning can also take an arbitrary amount of time. So use weston_output_arm_frame_timer() like all other timer based backends. It takes all of this into account and calculates the delay relative to the next expected vblank time. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
This commit is contained in:
parent
c335ec70af
commit
f36a0c2cb8
1 changed files with 1 additions and 3 deletions
|
|
@ -161,7 +161,6 @@ headless_output_repaint(struct weston_output *output_base)
|
|||
struct headless_output *output = to_headless_output(output_base);
|
||||
struct weston_compositor *ec;
|
||||
pixman_region32_t damage;
|
||||
int delay_msec;
|
||||
|
||||
assert(output);
|
||||
|
||||
|
|
@ -178,8 +177,7 @@ headless_output_repaint(struct weston_output *output_base)
|
|||
|
||||
pixman_region32_fini(&damage);
|
||||
|
||||
delay_msec = millihz_to_nsec(output->mode.refresh) / 1000000;
|
||||
wl_event_source_timer_update(output->finish_frame_timer, delay_msec);
|
||||
weston_output_arm_frame_timer(output_base, output->finish_frame_timer);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue