diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2013-10-16 11:10:12 -0700 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2013-10-21 14:09:12 -0700 |
commit | a0b893587748dbc86ec576880fbe057d8748c644 (patch) | |
tree | 9ce36a3248f107c0f6d1fd055c0ec98cf76391a9 | |
parent | 69e57ccba04b1608cf2b01d480d4758b16032ff3 (diff) |
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
-rw-r--r-- | src/compositor.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compositor.c b/src/compositor.c index a89d2a93..56658633 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -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; } |