electron/patches
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
..
boringssl chore: bump chromium to 119.0.6006.0 (main) (#39774) 2023-09-18 16:44:09 -04:00
chromium fix: disable background throttling also in the viz::DisplayScheduler (#38924) 2023-09-26 16:00:46 -04:00
devtools_frontend chore: bump chromium to 118.0.5991.0 (main) (#39714) 2023-09-05 21:17:56 -04:00
ffmpeg chore: bump chromium to 113.0.5651.0 (main) (#37553) 2023-03-15 18:20:32 +09:00
Mantle chore: bump chromium to 096e5313aaf19dfa0c4710145c34d (master) (#26535) 2020-12-14 10:57:36 -08:00
nan chore(deps): roll nan to pick up upstreams (#39916) 2023-09-20 15:37:10 +02:00
node test: fixup parallel/test-node-output-error test (#39972) 2023-09-25 16:23:05 -04:00
perfetto chore: bump chromium to 100.0.4857.0 (main) (#32419) 2022-02-09 18:58:52 -08:00
ReactiveObjC chore: bump chromium to 94.0.4584.0 (main) (#30030) 2021-07-26 09:02:16 -07:00
squirrel.mac feat: add new ElectronSquirrelPreventDowngrades flag (#38625) 2023-09-11 11:54:51 -07:00
v8 chore: bump chromium to 119.0.6016.0 (main) (#39898) 2023-09-19 19:34:56 +02:00
webrtc fix: check PipeWire init before creating generic capturer (#39846) 2023-09-14 15:50:20 -04:00
config.json chore: bump chromium to 113.0.5636.0 (main) (#37130) 2023-03-10 10:07:42 -06:00
README.md docs: add a dev doc describing the patch system (#20489) 2019-10-09 14:48:09 -07:00