On Fri,  3 Mar 2017 16:59:42 +0000
Daniel Stone <[email protected]> wrote:

> repaint_scheduled is actually cleverly a quad-state, disguised as a
> boolean. There are four possible conditions for the repaint loop to be
> in at any time:
>   - loop idle; no repaint will occur until specifically requested, which
>     may be never (repaint_scheduled == 0)
>   - loop schedule to begin: the loop was previously idle, but due to a
>     repaint-schedule request, we will call the start_repaint_loop hook
>     in the next idle timer

s/timer/task/

I can fix that when merging. Right?

>   - repaint scheduled: the compositor has definitively scheduled a
>     repaint request for this output, which will occur in fixed time
>   - awaiting repaint completion: the backend has not yet signaled
>     completion of the last repaint request, and the compositor will not
>     schedule another until it does so
> 
> All but the first condition were previously conflated as
> repaint_scheduled == 1, but break them out into separate conditions to
> aid clarity, backed up by some asserts.
> 
> Signed-off-by: Daniel Stone <[email protected]>
> ---
>  libweston/compositor.c | 20 +++++++++++++++++---
>  libweston/compositor.h | 10 +++++++++-
>  2 files changed, 26 insertions(+), 4 deletions(-)
> 
> v3: Only this patch has changed in this revision of the series.
>     Tri-state wasn't actually enough on multi-output setups: if
>     both outputs were set to REPAINT_SCHEDULED to call
>     start_repaint_loop, one output could trigger a full repaint,
>     arm the timer, and clear the repaint status before the other's
>     idle_repaint hook was called. This would then fail the assert
>     (good thing it was there!) in start_repaint_loop.
>     Fix this by expanding to quad-state, handling
>     waiting-for-idle_repaint-to-start_repaint_loop as a separate
>     status.

Reviewed-by: Pekka Paalanen <[email protected]>


Thanks,
pq

Attachment: pgpNybO8LhY49.pgp
Description: OpenPGP digital signature

_______________________________________________
wayland-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to