f7e3e1f97a
* fix: remove white screen flicker by disabling compositor recycling * chore: disable spec whose flakiness was made obvious by this patch
20 lines
1.4 KiB
Diff
20 lines
1.4 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/browser_compositor_view_mac.mm b/content/browser/renderer_host/browser_compositor_view_mac.mm
|
|
index 18019d5794f688ca07b35a665cc9800bb1d3047a..60c7e980dd322ba012c564fca68848c3188ca5dc 100644
|
|
--- a/content/browser/renderer_host/browser_compositor_view_mac.mm
|
|
+++ b/content/browser/renderer_host/browser_compositor_view_mac.mm
|
|
@@ -209,7 +209,7 @@
|
|
}
|
|
|
|
void BrowserCompositorMac::SetRenderWidgetHostIsHidden(bool hidden) {
|
|
- render_widget_host_is_hidden_ = hidden;
|
|
+ render_widget_host_is_hidden_ = false;
|
|
UpdateState();
|
|
}
|
|
|