perf(background): fix micro-stutter at start of wallpaper transition - #96
Open
TerraEgg wants to merge 1 commit into
Open
perf(background): fix micro-stutter at start of wallpaper transition#96TerraEgg wants to merge 1 commit into
TerraEgg wants to merge 1 commit into
Conversation
…smoothness - Introduce transitionPending to prevent premature ShaderEffect activation while asynchronous image decoding is underway - Keep current wallpaper visible without interruption until the new wallpaper is fully ready in memory - Switch animation easing from InOutCubic to InOutQuad (1000ms) to eliminate the flat hesitation zone at start
TerraEgg
force-pushed
the
perf/wallpaper-transition-smoothness
branch
from
September 9, 2026 08:35
d9d8140 to
7f21d8f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Changing wallpapers causes a noticeable 100-250ms freeze at the start of the transition before the animation starts moving.
Cause
onWallpaperPathChangedsetstransitionProgress = 0.0immediately, which makestransitionEffectvisible right away. Becausewallpaperloads asynchronously (asynchronous: true),transitionAnimhas to wait forwallpaper.status === Image.Ready. This leaves the shader frozen on screen at progress 0 while the image decodes.Easing.InOutCubicover 1200ms has a flat curve at the start, making the initial movement feel sluggish.Changes
transitionPendingflag.transitionProgressstays at 1.0 while the new wallpaper decodes in the background, keeping the current wallpaper visible on screen without showing a paused shader.wallpaper.status === Image.Ready,transitionProgressis set to 0.0 andtransitionAnim.restart()fires at the same time.Easing.InOutQuadwith a 1000ms duration for a smoother start.Builds on #95.
Testing
Tested on a 165Hz display switching between large wallpapers. The transition starts immediately once the image is decoded with no pause on frame 0.