perf(ui): stop backdrop effects requesting frames behind a modal
While a blur overlay (a modal dialog or the lock screen) covers the window, the theme backdrop effects kept requesting animation frames even though they are not visible, so the app never went idle and re-rendered continuously. The ambient animation predicate now drops the backdrop-effects term when a blur overlay was active last frame. Reduce Motion and the unfocused/hidden throttle were already handled, and the overlay's own moving elements (the lock screen's unlock dots, a spinner) still request frames through the progress term, so nothing on screen freezes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+5
-1
@@ -2359,8 +2359,12 @@ int main(int argc, char* argv[])
|
||||
const bool backdropNeedsFrames = (backdrop_active || app.getGradientTexture() != 0)
|
||||
&& !opaqueBackground;
|
||||
const bool reduceMotion = app.settings() && app.settings()->getReduceMotion();
|
||||
// C128: suppress backdrop theme-effect frame requests while a blur overlay (a modal dialog or
|
||||
// the lock screen) covers them -- they aren't visible, and the overlay's own moving elements
|
||||
// request frames via RequestProgressFrame(), so this never freezes anything on screen.
|
||||
const bool effectsAnimating = !reduceMotion
|
||||
&& dragonx::ui::effects::ThemeEffects::instance().hasActiveAnimation();
|
||||
&& dragonx::ui::effects::ThemeEffects::instance().hasActiveAnimation()
|
||||
&& !dragonx::ui::material::AnyBlurOverlayActiveLastFrame();
|
||||
const bool ambient = effectsAnimating
|
||||
|| backdropNeedsFrames
|
||||
|| avatarAnimating
|
||||
|
||||
Reference in New Issue
Block a user