libweston: Reset repaint schedule for all repainted outputs when repaint cancel
All outputs is canceled repaint when a output repaint is failed. At that time, the output whose repaint is success is not scheduled because the repaint status of that is still REPAINT_AWAITING_COMPLETION. Therefore, we need to reset repaint schedule for all repainted outputs. Signed-off-by: Tomohito Esaki <etom@igel.co.jp> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This commit is contained in:
committed by
Pekka Paalanen
parent
09bfcd6e1e
commit
7f4d9ffefa
@@ -2450,6 +2450,8 @@ weston_output_maybe_repaint(struct weston_output *output, struct timespec *now,
|
|||||||
int ret = 0;
|
int ret = 0;
|
||||||
int64_t msec_to_repaint;
|
int64_t msec_to_repaint;
|
||||||
|
|
||||||
|
output->repainted = false;
|
||||||
|
|
||||||
/* We're not ready yet; come back to make a decision later. */
|
/* We're not ready yet; come back to make a decision later. */
|
||||||
if (output->repaint_status != REPAINT_SCHEDULED)
|
if (output->repaint_status != REPAINT_SCHEDULED)
|
||||||
return ret;
|
return ret;
|
||||||
@@ -2479,6 +2481,7 @@ weston_output_maybe_repaint(struct weston_output *output, struct timespec *now,
|
|||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
|
output->repainted = true;
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
err:
|
err:
|
||||||
@@ -2550,6 +2553,11 @@ output_repaint_timer_handler(void *data)
|
|||||||
compositor->backend->repaint_flush(compositor,
|
compositor->backend->repaint_flush(compositor,
|
||||||
repaint_data);
|
repaint_data);
|
||||||
} else {
|
} else {
|
||||||
|
wl_list_for_each(output, &compositor->output_list, link) {
|
||||||
|
if (output->repainted)
|
||||||
|
weston_output_schedule_repaint_reset(output);
|
||||||
|
}
|
||||||
|
|
||||||
if (compositor->backend->repaint_cancel)
|
if (compositor->backend->repaint_cancel)
|
||||||
compositor->backend->repaint_cancel(compositor,
|
compositor->backend->repaint_cancel(compositor,
|
||||||
repaint_data);
|
repaint_data);
|
||||||
|
|||||||
@@ -212,6 +212,9 @@ struct weston_output {
|
|||||||
* if set, a repaint will eventually occur. */
|
* if set, a repaint will eventually occur. */
|
||||||
bool repaint_needed;
|
bool repaint_needed;
|
||||||
|
|
||||||
|
/** Used only between repaint_begin and repaint_cancel. */
|
||||||
|
bool repainted;
|
||||||
|
|
||||||
/** State of the repaint loop */
|
/** State of the repaint loop */
|
||||||
enum {
|
enum {
|
||||||
REPAINT_NOT_SCHEDULED = 0, /**< idle; no repaint will occur */
|
REPAINT_NOT_SCHEDULED = 0, /**< idle; no repaint will occur */
|
||||||
|
|||||||
Reference in New Issue
Block a user