elementary / gala

Gala Window Manager for elementary OS and Pantheon
https://elementary.io
GNU General Public License v3.0
275 stars 77 forks source link

ShadowEffect: Delay cache drop for switching shadow sizes performance improvements #2061

Open leolost2605 opened 2 months ago

leolost2605 commented 2 months ago

Fixes #2060

Idk if this is a good and/or common way to do this but it should work :shrug:

The reasoning here is that during the workspace switch animation the actor width and/or height often changes by one pixel back and forth. This would cause the shadow to be dropped and created again multiple times during a switch. By keeping them in the cache for 5 seconds before dropping them we can avoid this. While a second or so would be enough for a single switch the whole feel is a lot smoother when trying to switch over multiple workspaces in one go.