Skip to content

Fix slow visual feedback on screenshot service

Brion Vibber (WMF) requested to merge bvibber/gnome-shell:fast-flash into master

Fix slow audiovisual feedback on screenshot service

Adds a "screenshot-taken" signal from the screenshot service's internal C implementation to the JS side, and uses that to trigger the camera flash visual effect and the click, allowing them to run in parallel with the PNG compression instead of waiting until the file is complete to start.

This significantly improves perceived latency on high res setups such as 4K, 5K, or dual 4K screens.

See #512 (closed)

For dual 4K I measured save times in excess of 1.25s on old first-generation Core (Nehalem) 2.26 GHz workstation, and expect about 0.5s on more modern high end workstations, still noticeable for keyboard event feedback.

Unredirect disabling is also reduced from the entire time of grab and compression to just during the screen grab, improving performance of 3d games during a screenshot.

Companion patches for gnome-settings-daemon and gnome-screenshot are required to avoid double sound effects:

gnome-settings-daemon!44 (closed) gnome-screenshot!3 (closed)

Note this moves some strings from gnome-settings-daemon.

Edited by Jonas Dreßler

Merge request reports