mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2025-12-24 20:40:11 +01:00
core: rename and internally share output_repaint_timer_arm
When we add timed transactions, we'll want to feed them through the repaint timer, so share it to allow this in the future. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
37256645d6
commit
e286cf6e15
2 changed files with 15 additions and 5 deletions
|
|
@ -3900,8 +3900,15 @@ weston_output_repaint_from_present(const struct weston_output *output,
|
||||||
return repaint_time;
|
return repaint_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
/** Arm the output repaint timer
|
||||||
output_repaint_timer_arm(struct weston_compositor *compositor)
|
*
|
||||||
|
* \param compositor The compositor instance
|
||||||
|
*
|
||||||
|
* Walk the output list and set the compositor repaint timer to fire at the
|
||||||
|
* next best time to repaint.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
weston_repaint_timer_arm(struct weston_compositor *compositor)
|
||||||
{
|
{
|
||||||
struct weston_output *output;
|
struct weston_output *output;
|
||||||
bool any_should_repaint = false;
|
bool any_should_repaint = false;
|
||||||
|
|
@ -3951,7 +3958,7 @@ weston_output_schedule_repaint_restart(struct weston_output *output)
|
||||||
output->repaint_status = REPAINT_SCHEDULED;
|
output->repaint_status = REPAINT_SCHEDULED;
|
||||||
TL_POINT(output->compositor, TLP_CORE_REPAINT_RESTART,
|
TL_POINT(output->compositor, TLP_CORE_REPAINT_RESTART,
|
||||||
TLP_OUTPUT(output), TLP_END);
|
TLP_OUTPUT(output), TLP_END);
|
||||||
output_repaint_timer_arm(output->compositor);
|
weston_repaint_timer_arm(output->compositor);
|
||||||
weston_output_damage(output);
|
weston_output_damage(output);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4129,7 +4136,7 @@ output_repaint_timer_handler(int fd, uint32_t mask, void *data)
|
||||||
wl_list_for_each(output, &compositor->output_list, link)
|
wl_list_for_each(output, &compositor->output_list, link)
|
||||||
output->repainted = false;
|
output->repainted = false;
|
||||||
|
|
||||||
output_repaint_timer_arm(compositor);
|
weston_repaint_timer_arm(compositor);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -4275,7 +4282,7 @@ out:
|
||||||
output->next_repaint = weston_output_repaint_from_present(output, &now,
|
output->next_repaint = weston_output_repaint_from_present(output, &now,
|
||||||
&output->next_present);
|
&output->next_present);
|
||||||
output->repaint_status = REPAINT_SCHEDULED;
|
output->repaint_status = REPAINT_SCHEDULED;
|
||||||
output_repaint_timer_arm(compositor);
|
weston_repaint_timer_arm(compositor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -869,6 +869,9 @@ weston_surface_visibility_mask(struct weston_surface *surface);
|
||||||
void
|
void
|
||||||
weston_compositor_apply_transactions(struct weston_compositor *compositor);
|
weston_compositor_apply_transactions(struct weston_compositor *compositor);
|
||||||
|
|
||||||
|
void
|
||||||
|
weston_repaint_timer_arm(struct weston_compositor *compositor);
|
||||||
|
|
||||||
struct timespec
|
struct timespec
|
||||||
weston_output_repaint_from_present(const struct weston_output *output,
|
weston_output_repaint_from_present(const struct weston_output *output,
|
||||||
const struct timespec *now,
|
const struct timespec *now,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue