codebytere

#53668: chore: enable ThrottleResizeIpc instead of patching NotifyScreenInfoChanged

Merged
Created: Sep 7, 2026, 4:17:42 AM
Merged: Sep 7, 2026, 5:52:37 PM
3 comments
Target: main

Description of Change

fix_restore_original_resize_performance_on_macos.patch (#40577) made RenderWidgetHostImpl::NotifyScreenInfoChanged always take the throttled SynchronizeVisualProperties() path so macOS live resize does not send a visual-properties IPC per step. Chromium has since added the same behavior behind kThrottleResizeIpc (crrev.com/c/7807475, off by default): with it enabled, RenderWidgetHostViewMac::UpdateScreenInfo passes ignore_ack=false for size-only changes and keeps forcing the IPC when the display or scale factor changed. Our patch was rebased on top of that CL and now ignores the ignore_ack argument altogether, so it also throttles display changes and the fullscreen-ordering case the upstream comment describes, on every platform.

This enables ThrottleResizeIpc from feature_list_mac.mm (by name, the feature is not exported) and deletes the patch. On Windows and Linux nothing changes for resizes: RenderWidgetHostViewBase::UpdateScreenInfo returns early unless the screen info itself changed, and bounds changes already go through the throttled path.

EnablePlatformSpecificFeatures() is restructured to build the list up rather than return from inside the @available block; the ScreenCaptureKit entries are unchanged.

kThrottleResizeIpc has internal linkage in render_widget_host_view_mac.mm, so it can only be enabled by name; a gn gen assert in BUILD.gn (next to the mac_deployment_target one) checks that the definition is still there, so a roll that removes or renames it fails loudly instead of building without the throttle.

Checklist

Release Notes

Notes: none

Backports

45-x-y
Merged
PR Number
#53725
Merged At
Sep 7, 2026, 7:34:53 PM
Released In
Not yet
Release Date
Not yet

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

Semantic Versioning helps users understand the impact of updates:

  • Major (X.y.z): Breaking changes that may require code modifications
  • Minor (x.Y.z): New features that maintain backward compatibility
  • Patch (x.y.Z): Bug fixes that don't change the API
  • None: Changes that don't affect using facing parts of Electron