electron/docs/api/structures
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
..
bluetooth-device.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
browser-window-options.md chore: remove no-op fullscreenWindowTitle option (#39815) 2023-09-19 01:55:47 +09:00
certificate-principal.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
certificate.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
cookie.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
cpu-usage.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
crash-report.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
custom-scheme.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
desktop-capturer-source.md docs: fix broken links (#36519) 2022-12-05 13:18:57 -05:00
display.md feat: add label property to Display objects (#36855) 2023-01-18 15:44:40 +09:00
extension-info.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
extension.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
file-filter.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
file-path-with-headers.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
gpu-feature-status.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
hid-device.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
input-event.md feat: replace scroll-touch* with generic input-event (#35531) 2022-09-27 12:47:46 -07:00
io-counters.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
ipc-main-event.md docs: add links to IPC event structures (#37760) 2023-03-30 10:13:21 -07:00
ipc-main-invoke-event.md docs: add links to IPC event structures (#37760) 2023-03-30 10:13:21 -07:00
ipc-renderer-event.md chore: remove deprecated ipcRenderer.sendTo() (#39087) 2023-08-28 10:29:27 -04:00
jump-list-category.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
jump-list-item.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
keyboard-event.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
keyboard-input-event.md feat: replace scroll-touch* with generic input-event (#35531) 2022-09-27 12:47:46 -07:00
memory-info.md
memory-usage-details.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
mime-typed-buffer.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
mouse-input-event.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
mouse-wheel-input-event.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
notification-action.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
notification-response.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
payment-discount.md feat: Added missing info to IAP transaction and product structures (#31739) 2022-01-24 08:55:18 -08:00
point.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
post-body.md feat: remove nativeWindowOpen option (#29405) 2022-01-06 09:28:03 -08:00
printer-info.md docs: update docs.microsoft.com links to learn.microsoft.com (#37707) 2023-03-29 12:16:44 +02:00
process-memory-info.md
process-metric.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
product-discount.md feat: Added missing info to IAP transaction and product structures (#31739) 2022-01-24 08:55:18 -08:00
product-subscription-period.md feat: Added missing info to IAP transaction and product structures (#31739) 2022-01-24 08:55:18 -08:00
product.md chore: bump chromium to 117.0.5852.0 (main) (#38891) 2023-07-01 16:22:55 -04:00
protocol-request.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
protocol-response-upload-data.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
protocol-response.md docs: update links to Chromium source (#33309) 2022-03-17 13:45:55 +01:00
rectangle.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
referrer.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
render-process-gone-details.md docs: add missing webview render-process-gone event (#39494) 2023-08-17 08:52:15 +09:00
resolved-endpoint.md feat: session.resolveHost (#37690) 2023-04-05 10:06:14 -04:00
resolved-host.md feat: session.resolveHost (#37690) 2023-04-05 10:06:14 -04:00
scrubber-item.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
segmented-control-segment.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
serial-port.md docs: fix SerialPort typing (#38544) 2023-06-05 15:58:30 +09:00
service-worker-info.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
shared-worker-info.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
sharing-item.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
shortcut-details.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
size.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
task.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
thumbar-button.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
trace-categories-and-options.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
trace-config.md docs: update links to Chromium source (#33309) 2022-03-17 13:45:55 +01:00
transaction.md feat: Added missing info to IAP transaction and product structures (#31739) 2022-01-24 08:55:18 -08:00
upload-data.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
upload-file.md feat: add protocol.handle (#36674) 2023-03-27 10:00:55 -07:00
upload-raw-data.md
usb-device.md feat: add support for WebUSB (#36289) 2022-11-22 16:50:32 -05:00
user-default-types.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
web-preferences.md fix: disable background throttling also in the viz::DisplayScheduler (#38924) 2023-09-26 16:00:46 -04:00
web-request-filter.md feat: add types to webRequest filter (#30914) 2023-02-27 11:16:59 -08:00
web-source.md chore: bump chromium to 99.0.4767.0 (main) (#31986) 2022-01-10 17:31:39 -05:00