mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-04 23:27:58 +02:00
compositor: Stop the repaint loop if the compositor went to sleep
We check the state when we schedule a repaint, but we will still repaint in weston_output_finish_frame() if a repaint is needed. Now we check whether we went to sleep while waiting for the page flip and stop repainting in that case. https://bugs.freedesktop.org/show_bug.cgi?id=65802
This commit is contained in:
parent
78fe75368a
commit
991810c1b3
1 changed files with 4 additions and 1 deletions
|
|
@ -1443,7 +1443,10 @@ weston_output_finish_frame(struct weston_output *output, uint32_t msecs)
|
|||
int fd;
|
||||
|
||||
output->frame_time = msecs;
|
||||
if (output->repaint_needed) {
|
||||
|
||||
if (output->repaint_needed &&
|
||||
compositor->state != WESTON_COMPOSITOR_SLEEPING &&
|
||||
compositor->state != WESTON_COMPOSITOR_OFFSCREEN) {
|
||||
weston_output_repaint(output, msecs);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue