mirror of
https://github.com/servo/servo.git
synced 2025-08-01 11:40:30 +01:00
Auto merge of #25914 - paulrouget:lessRAF, r=jdm
Stop embedder calls and fake rAF when window not visible This addresses 2 issues: - a rAF loop might still be ongoing when the window is invisible if script decided that the rAF were going too fast (spurious rAF) - a hidden window does not run the rAF loop, but the embedder would still be in animating mode --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
This commit is contained in:
commit
ad1a4adac5
3 changed files with 11 additions and 6 deletions
|
@ -483,9 +483,7 @@ impl<Window: WindowMethods + ?Sized> IOCompositor<Window> {
|
|||
ShutdownState::NotShuttingDown,
|
||||
) => {
|
||||
self.pipeline_details(pipeline_id).visible = visible;
|
||||
if visible {
|
||||
self.process_animations();
|
||||
}
|
||||
self.process_animations();
|
||||
},
|
||||
|
||||
(Msg::PipelineExited(pipeline_id, sender), _) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue