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
browser-window-options.md chore: remove no-op fullscreenWindowTitle option (#39815) 2023-09-19 01:55:47 +09:00
certificate-principal.md
certificate.md
cookie.md
cpu-usage.md
crash-report.md
custom-scheme.md
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
extension.md
file-filter.md
file-path-with-headers.md
gpu-feature-status.md
hid-device.md
input-event.md
io-counters.md
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
jump-list-item.md
keyboard-event.md
keyboard-input-event.md
memory-info.md
memory-usage-details.md
mime-typed-buffer.md
mouse-input-event.md
mouse-wheel-input-event.md
notification-action.md
notification-response.md
payment-discount.md
point.md
post-body.md
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
product-discount.md
product-subscription-period.md
product.md chore: bump chromium to 117.0.5852.0 (main) (#38891) 2023-07-01 16:22:55 -04:00
protocol-request.md
protocol-response-upload-data.md
protocol-response.md
rectangle.md
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
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
shared-worker-info.md docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
sharing-item.md
shortcut-details.md
size.md
task.md
thumbar-button.md
trace-categories-and-options.md
trace-config.md
transaction.md
upload-data.md
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
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