electron/docs
michal-pichlinski-openfin 2190793fe6
fix: disable background throttling also in the viz::DisplayScheduler (#38924)
* fix: disable background throttling also in the `viz::DisplayScheduler`

`viz::DisplayScheduler` is responsible for drawing and swapping frames
in the `DisplayScheduler::DrawAndSwap` which is called from the
`DisplayScheduler::AttemptDrawAndSwap` if the `DisplayScheduler::ShouldDraw`
returns true. `ShouldDraw` depends on the `DisplayScheduler` visibility
and when it is not visible then it returns false.

In order to keep producing frames, disabling `backgroundThrottling`
should also prevent changing `DisplayScheduler` visibility to false.

`DisplayScheduler` lives in the `ui::Compositor` where every
`electron::NativewWindow` has its own `Compositor`. `electron::NativewWindow`
may be host of the multiple `electron::api::WebContents` instances which may
have different `WebPreferences` settings. Therefore if at least one
of the `WebContents` requires disabling throttling then all other `WebContents`
using the same window will have it disabled in the `ui::Compositor`.

BREAKING CHANGE:
`backgroundThrottling` set to false will disable frames throttling
in the `BrowserWindow` for all `WebContents` displayed by it.

Close: [#31016](https://github.com/electron/electron/issues/31016)

* fixup! fix: disable background throttling also in the `viz::DisplayScheduler`

* fixup! fix: disable background throttling also in the `viz::DisplayScheduler`

* fixup! fix: disable background throttling also in the `viz::DisplayScheduler`

---------

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2023-09-26 16:00:46 -04:00
..
api fix: disable background throttling also in the viz::DisplayScheduler (#38924) 2023-09-26 16:00:46 -04:00
development chore: move node headers generation to electron (#39589) 2023-08-22 11:13:49 +02:00
fiddles refactor: replace .forEach() with for-of (#39691) 2023-08-31 23:36:43 +09:00
images docs: use local img for contents.adjustSelection api (#38655) 2023-06-07 23:49:19 -07:00
tutorial docs: correct v24 Alpha date (#39963) 2023-09-24 23:03:29 -07:00
breaking-changes.md fix: disable background throttling also in the viz::DisplayScheduler (#38924) 2023-09-26 16:00:46 -04:00
experimental.md docs: Markdown linting and typo (#35568) 2022-09-13 13:49:11 -07:00
faq.md docs: change MSDN links to new Microsoft docs (#37603) 2023-03-21 11:39:19 -04:00
glossary.md docs: update docs.microsoft.com links to learn.microsoft.com (#37707) 2023-03-29 12:16:44 +02:00
README.md docs: delete synopsis.md (#37580) 2023-03-16 17:05:15 -07:00
styleguide.md chore: disallow shortcut reference links in docs Markdown (#36860) 2023-01-16 10:22:49 +01:00

Official Guides

Please make sure that you use the documents that match your Electron version. The version number should be a part of the page URL. If it's not, you are probably using the documentation of a development branch which may contain API changes that are not compatible with your Electron version. To view older versions of the documentation, you can browse by tag on GitHub by opening the "Switch branches/tags" dropdown and selecting the tag that matches your version.

FAQ

There are questions that are asked quite often. Check this out before creating an issue:

Guides and Tutorials

Getting started

Learning the basics

Advanced steps

Detailed Tutorials

These individual tutorials expand on topics discussed in the guide above.


API References

Custom DOM Elements:

Modules for the Main Process:

Modules for the Renderer Process (Web Page):

Modules for Both Processes:

Development

See development/README.md