renderer/native: Avoid requeuing the same onscreen for a power save flip
This is a case that triple buffering will encounter. We don't want it to queue the same onscreen multiple times because that would represent multiple flips occurring simultaneously. It's a linear search but the list length is typically only 1 or 2 so no need for anything fancier yet. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1441>
This commit is contained in:
parent
f7b296f2a9
commit
fccfaca9fc
@ -759,6 +759,9 @@ meta_renderer_native_queue_power_save_page_flip (MetaRendererNative *renderer_na
|
|||||||
{
|
{
|
||||||
const unsigned int timeout_ms = 100;
|
const unsigned int timeout_ms = 100;
|
||||||
|
|
||||||
|
if (g_list_find (renderer_native->power_save_page_flip_onscreens, onscreen))
|
||||||
|
return;
|
||||||
|
|
||||||
if (!renderer_native->power_save_page_flip_source_id)
|
if (!renderer_native->power_save_page_flip_source_id)
|
||||||
{
|
{
|
||||||
renderer_native->power_save_page_flip_source_id =
|
renderer_native->power_save_page_flip_source_id =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user