gdk: Enable swap throttling on full screen windows

Desktop / GNOME / Clutter - Emmanuele Bassi [gnome.org] - 25 January 2016 12:48 UTC

Since commit 6183eb363282e5143bfd52aa36b5e6a318c4c992 we disabled swap throttling in favour of being driven by the GDK frame clock (and thus by the compositor).

Compositors may decide to unredirect full screen windows to avoid the performance penalty of the additional copy, especially on X11, which means that a Clutter application marked as full screen is not going to be driven by the compositor, and it's not going to be throttled by the underlying GL machinery. This has a performance impact on constrained platforms.

For this reason, we should re-enable swap throttling when the window is full screen.

As the change was introduced especially because of Wayland, we should check that we're not running as clients under a Wayland compositor; if we do, we always keep swap throttling disabled, as the compositor will always manage our output, even when full screen.

c624230 gdk: Enable swap throttling on full screen windows
clutter/gdk/clutter-stage-gdk.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Upstream: git.gnome.org


  • Share