mirror of
https://github.com/electron/electron.git
synced 2026-01-06 22:24:03 -05:00
* chore: bump chromium in DEPS to 144.0.7504.0
* chore: bump chromium in DEPS to 144.0.7506.0
* chore: update patches
* Revert "build: explicitly disable reclient"
This reverts commit e08c6adb08.
No longer needed after https://crrev.com/c/7099239
* 7097498: Remove MSG_ROUTING_* constants from ipc_message.h
https://chromium-review.googlesource.com/c/chromium/src/+/7097498
* 7090671: [//gpu] Remove unneeded GpuInfo methods
https://chromium-review.googlesource.com/c/chromium/src/+/7090671
* 7103701: Remove IPC::PlatformFileForTransit.
https://chromium-review.googlesource.com/c/chromium/src/+/7103701
(This should have been removed with https://github.com/electron/electron/pull/17406).
* chore: update filenames.libcxx.gni
---------
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
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 00f9abc97d2001fc0bd095d2c62097f2ed1ae047..71fb36989aeb2c3232f624501933ed48a50e06cd 100644
|
|
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
|
|
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
|
@@ -559,7 +559,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);
|
|
}
|
|
|
|
void RenderWidgetHostViewMac::SetSize(const gfx::Size& size) {
|