mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
* chore: bump chromium in DEPS to 148.0.7776.0 * chore: bump chromium in DEPS to 148.0.7778.0 * fix(patch): buffered_data_source_host_impl include added upstream Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7712714 Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com> * fix(patch): ASan process info callback added upstream Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7724018 Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com> * fix(patch): ServiceProcessHost per-instance observer migration Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7700794 Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com> * fix(patch): FSA BlockPath factory method refactor Upstream refactored BlockPath initialization to use factory methods (CreateRelative, CreateAbsolute, CreateSuffix) and a switch statement. Updated the exposed code in the header to match. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7665590 Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com> * fix(patch): service process tracker per-instance observer refactor Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7700794 Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com> * chore: update patches (trivial only) * 7723958: Rename blink::WebString::FromUTF16() to FromUtf16() Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7723958 Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com> * fixup! fix(patch): ASan process info callback added upstream --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Samuel Maddock <samuelmaddock@electronjs.org> Co-authored-by: Claude <svc-devxp-claude@slack-corp.com>
25 lines
1.7 KiB
Diff
25 lines
1.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Andy Locascio <andy@slack-corp.com>
|
|
Date: Wed, 21 Aug 2019 12:09:10 -0700
|
|
Subject: fix: disabling compositor recycling
|
|
|
|
Compositor recycling is useful for Chrome because there can be many tabs and spinning up a compositor for each one would be costly. In practice, Chrome uses the parent compositor code path of browser_compositor_view_mac.mm; the NSView of each tab is detached when it's hidden and attached when it's shown. For Electron, there is no parent compositor, so we're forced into the "own compositor" code path, which seems to be non-optimal and pretty ruthless in terms of the release of resources. Electron has no real concept of multiple tabs per window, so it should be okay to disable this ruthless recycling altogether in Electron.
|
|
|
|
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
|
index 886b3e87e9041931d3cb59ef775b5012e8e2f908..9287bde2d8c0eaa00c29fca974111b3f32b6e813 100644
|
|
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
|
|
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
|
@@ -597,7 +597,11 @@
|
|
}
|
|
|
|
host()->WasHidden();
|
|
- browser_compositor_->SetRenderWidgetHostIsHidden(true);
|
|
+ // Consider the RWHV occluded only if it is not attached to a window
|
|
+ // (e.g. unattached BrowserView). Otherwise we treat it as visible to
|
|
+ // prevent unnecessary compositor recycling.
|
|
+ const bool unattached = ![GetInProcessNSView() window];
|
|
+ browser_compositor_->SetRenderWidgetHostIsHidden(unattached);
|
|
|
|
// Headless mode forces focus change propagation inside Focus(), since there
|
|
// is no NSWindow to deliver the normal focus change notifications. As a
|