mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-06-21 14:48:25 +02:00
Merge branch 'devanshi_bansal/compositor-skip-deferred-repaint' into 'main'
compositor: skip deferred repaint when no output is actively painting See merge request wayland/weston!2095
This commit is contained in:
commit
95dba22e4b
1 changed files with 18 additions and 2 deletions
|
|
@ -4917,8 +4917,24 @@ weston_output_schedule_repaint(struct weston_output *output)
|
|||
return;
|
||||
|
||||
if (output->backend->deferred) {
|
||||
output->repaint_status = REPAINT_DEFERRED;
|
||||
return;
|
||||
bool any_active = false;
|
||||
struct weston_output *out;
|
||||
|
||||
wl_list_for_each(out, &compositor->output_list, link) {
|
||||
if (out->backend != output->backend)
|
||||
continue;
|
||||
if (out->repaint_status == REPAINT_BEGIN_FROM_IDLE ||
|
||||
out->repaint_status == REPAINT_SCHEDULED ||
|
||||
out->repaint_status == REPAINT_AWAITING_COMPLETION) {
|
||||
any_active = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (any_active) {
|
||||
output->repaint_status = REPAINT_DEFERRED;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
output->repaint_status = REPAINT_BEGIN_FROM_IDLE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue