-
Notifications
You must be signed in to change notification settings - Fork 16.9k
fix: MacOS 26 Tahoe - stop overriding private cornerMask API to fix WindowServer GPU load #48376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
💖 Thanks for opening this pull request! 💖 Semantic PR titlesWe use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix. Examples of commit messages with semantic prefixes:
Commit signingThis repo enforces commit signatures for all incoming PRs. PR tipsThings that will help get your PR across the finish line:
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can. |
… GPU load spike Electron fetched a custom `_cornerMask` for `ElectronNSWindow` to smooth vibrancy corners. On macOS 15 (Tahoe) that private hook forces the window shadow to be rendered from a fully transparent surface, causing the WindowServer GPU load regression. Remove the `cornerMask` property and the `_cornerMask` override so we stay on Apple’s default shadow path.
|
Tested this and validated the bug from N years ago is no longer present in modern macOS versions (frameless vibrant windows not being rounded) |
VerteDinde
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@avarayr Thanks so much for all of your time and effort digging into this issue - I'm sorry for the trouble, the Electron maintainers really appreciate you doing such a deep dive on this fairly complex issue and putting up this fix 🙇♀️
|
Thank you, @avarayr and @fredizzimo, for debugging this and finding a solution! |
|
Congrats on merging your first pull request! 🎉🎉🎉 |
|
Release Notes Persisted
|
…indowServer GPU load (#48376) fix: macOS stop overriding private cornerMask API to fix WindowServer GPU load spike Electron fetched a custom `_cornerMask` for `ElectronNSWindow` to smooth vibrancy corners. On macOS 15 (Tahoe) that private hook forces the window shadow to be rendered from a fully transparent surface, causing the WindowServer GPU load regression. Remove the `cornerMask` property and the `_cornerMask` override so we stay on Apple’s default shadow path. Co-authored-by: avarayr <[email protected]>
…indowServer GPU load (#48376) fix: macOS stop overriding private cornerMask API to fix WindowServer GPU load spike Electron fetched a custom `_cornerMask` for `ElectronNSWindow` to smooth vibrancy corners. On macOS 15 (Tahoe) that private hook forces the window shadow to be rendered from a fully transparent surface, causing the WindowServer GPU load regression. Remove the `cornerMask` property and the `_cornerMask` override so we stay on Apple’s default shadow path. Co-authored-by: avarayr <[email protected]>
…indowServer GPU load (#48376) fix: macOS stop overriding private cornerMask API to fix WindowServer GPU load spike Electron fetched a custom `_cornerMask` for `ElectronNSWindow` to smooth vibrancy corners. On macOS 15 (Tahoe) that private hook forces the window shadow to be rendered from a fully transparent surface, causing the WindowServer GPU load regression. Remove the `cornerMask` property and the `_cornerMask` override so we stay on Apple’s default shadow path. Co-authored-by: avarayr <[email protected]>
|
I have automatically backported this PR to "38-x-y", please check out #48398 |
@tmm1 We do not know what triggers this issue on someone's machine. It only happens for a small percentage of users. (A small percentage of Mac users is still a large number, of course.) None of our maintainers have been able to reproduce it. |
…indowServer GPU load (electron#48376) fix: macOS stop overriding private cornerMask API to fix WindowServer GPU load spike Electron fetched a custom `_cornerMask` for `ElectronNSWindow` to smooth vibrancy corners. On macOS 15 (Tahoe) that private hook forces the window shadow to be rendered from a fully transparent surface, causing the WindowServer GPU load regression. Remove the `cornerMask` property and the `_cornerMask` override so we stay on Apple’s default shadow path.
Upgrades Electron from 34.5.1 to 38.6.0 to resolve excessive WindowServer GPU usage on macOS 26 (Sequoia). This issue was caused by Electron's override of the private _cornerMask API, which forced the compositor to treat window masks as dynamic rather than static, resulting in persistent high GPU load. Changes: - Upgrade electron: 34.5.1 → 38.6.0 - Upgrade electron-mksnapshot: 34.5.1 → 38.6.0 - Upgrade @electron/rebuild: ^3.7.1 → ^3.7.2 - Upgrade node-abi: ^3.67.0 → ^3.81.0 (required for Electron 38 support) The fix was introduced in Electron 36.9.2, 37.6.0, 38.2.0, and all later versions. We're upgrading to 38.6.0 as it's the latest stable version compatible with Node 20.11.0. Fixes: electron/electron#48376
…indowServer GPU load (electron#48376) fix: macOS stop overriding private cornerMask API to fix WindowServer GPU load spike Electron fetched a custom `_cornerMask` for `ElectronNSWindow` to smooth vibrancy corners. On macOS 15 (Tahoe) that private hook forces the window shadow to be rendered from a fully transparent surface, causing the WindowServer GPU load regression. Remove the `cornerMask` property and the `_cornerMask` override so we stay on Apple’s default shadow path.
…indowServer GPU load (electron#48376) fix: macOS stop overriding private cornerMask API to fix WindowServer GPU load spike Electron fetched a custom `_cornerMask` for `ElectronNSWindow` to smooth vibrancy corners. On macOS 15 (Tahoe) that private hook forces the window shadow to be rendered from a fully transparent surface, causing the WindowServer GPU load regression. Remove the `cornerMask` property and the `_cornerMask` override so we stay on Apple’s default shadow path.
…indowServer GPU load (electron#48376) fix: macOS stop overriding private cornerMask API to fix WindowServer GPU load spike Electron fetched a custom `_cornerMask` for `ElectronNSWindow` to smooth vibrancy corners. On macOS 15 (Tahoe) that private hook forces the window shadow to be rendered from a fully transparent surface, causing the WindowServer GPU load regression. Remove the `cornerMask` property and the `_cornerMask` override so we stay on Apple’s default shadow path.
* Fix macOS 26 GPU performance issue by upgrading to Electron 38 Upgrades Electron from 34.5.1 to 38.6.0 to resolve excessive WindowServer GPU usage on macOS 26 (Sequoia). This issue was caused by Electron's override of the private _cornerMask API, which forced the compositor to treat window masks as dynamic rather than static, resulting in persistent high GPU load. Changes: - Upgrade electron: 34.5.1 → 38.6.0 - Upgrade electron-mksnapshot: 34.5.1 → 38.6.0 - Upgrade @electron/rebuild: ^3.7.1 → ^3.7.2 - Upgrade node-abi: ^3.67.0 → ^3.81.0 (required for Electron 38 support) The fix was introduced in Electron 36.9.2, 37.6.0, 38.2.0, and all later versions. We're upgrading to 38.6.0 as it's the latest stable version compatible with Node 20.11.0. Fixes: electron/electron#48376 * Use optional chaining Signed-off-by: Philip Peterson <[email protected]> --------- Signed-off-by: Philip Peterson <[email protected]> Co-authored-by: Philip Peterson <[email protected]>
Description of Change
fixes: #48311
_cornerMaskselector inElectronNSWindowcornerMaskplumbing that applied a custom mask image to vibrant viewsRationale:
Backwards-compat concerns:
I see no reason to override
_cornerMaskas the corner radius masking is already covered byNSVisualEffectViewsetMaskImage, rendering NO visual difference without_cornerMaskoverride + vibrancyChecklist
npm testpassesRelease Notes
Notes: Fixed excessive WindowServer GPU usage on macOS Tahoe 26.