Rework “visible” to “throttled” in constellation + script + compositor (#31816)

This commit is contained in:
Delan Azabani 2024-03-22 14:06:28 +08:00 committed by GitHub
parent 9b26dca141
commit 8882507ad0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 124 additions and 129 deletions

View file

@ -1966,7 +1966,7 @@ impl Document {
// If we are running 'fake' animation frames, we unconditionally
// set up a one-shot timer for script to execute the rAF callbacks.
if self.is_faking_animation_frames() && self.window().visible() {
if self.is_faking_animation_frames() && !self.window().throttled() {
warn!("Scheduling fake animation frame. Animation frames tick too fast.");
let callback = FakeRequestAnimationFrameCallback {
document: Trusted::new(self),