[Next] Fix OSD level animation lag when using gesture volume control #13338
+39
−13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes visual laggy appearance of level animation in OSD when using touchpad gesture volume control, from #12760.
Need
The previous behavior forces 100ms LEVEL_ANIMATION_TIME transition for all level changes, even minuscule ones, causes extreme lag when using gestures.
Fix
For value changes less than 0.4 use new 'const LEVEL_ANIMATION_TIME_FAST' (set to 0), fast transitions.Switched to CLUTTER_LINEAR from EASE_OUT_QUAD animation mode to make transition smooth and reduce jerk.Note
Opened draft because very sudden large motions still show slight lag, maybe tune it further or add dynamic LEVEL_ANIMATION_TIME?this was happening because I forgot to pass the time args to a funcused 0.4 because I wanted brightness, that jumps by 0.4 on my system, to have the 100ms level animation and all below it 0ms.removed this, did not want magic numbers.Thanks for reviewing.
Closes #12760