Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove white screen flicker by disabling compositor recycling (#…
- Loading branch information
1 parent
339174d
commit 1cfd716
Showing
5 changed files
with
23 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 0 additions & 65 deletions
65
...hes/common/chromium/chore_add_debounce_on_the_updatewebcontentsvisibility_method_to.patch
This file was deleted.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
patches/common/chromium/fix_disabling_compositor_recycling.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Samuel Attard <sattard@slack-corp.com> | ||
Date: Thu, 22 Aug 2019 15:26:31 -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 59e58d693c971742951434f6582140d9179235f2..135e7a384a560f55e5201f108fe1ac2db621fbca 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(); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters