Repository navigation
fix: Fix compositor recycling when creating new BrowserView - #21372
Merged
Merged
Conversation
Contributor
Author
Contributor
Author
|
Note that this PR is strictly not necessary given that we can use the undocumented bool initially_shown = true;
options.Get(options::kShow, &initially_shown);
// ...
params.initially_hidden = !initially_shown;
web_contents = content::WebContents::Create(params); |
zcbenz
reviewed
Dec 4, 2019
In electron#20829, we fixed compositor recycling when switching between BrowserViews, but it turns out that there is one additional case that we need to handle. When we create a completely new BrowserView instance, it starts of as visible (even when it hasn't been added to the window), which means that it will need its own compositor instead of using the recycled compositor. To fix this, lets make BrowserViews hidden by default until they're added to the window. See also electron#19988. This is a potentially breaking change given that the initial value of `document.visibilityState` will now be `hidden`, but given the experimental status of BrowserViews, I think this is a fine change to make. The old behavior can be restored with `webPreferences: { show: true }`. Notes: Fix compositor recycling when creating new BrowserView
zcbenz
approved these changes
Dec 5, 2019
poiru
added a commit
to poiru/electron
that referenced
this pull request
Dec 5, 2019
Backport of electron#21372. This also backports a tiny bit of electron#19988. Notes: Fix flicker when switching between BrowserViews after creating new BrowserView
|
Release Notes Persisted
|
Contributor
|
I was unable to backport this PR to "6-1-x" cleanly; |
This was referenced Dec 5, 2019
Contributor
|
I have automatically backported this PR to "8-x-y", please check out #21399 |
Contributor
|
I have automatically backported this PR to "7-1-x", please check out #21400 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In #20829, we fixed compositor recycling when switching between
BrowserViews, but it turns out that there is one additional case that we
need to handle. When we create a completely new BrowserView instance, it
starts of as visible (even when it hasn't been added to the window),
which means that it will need its own compositor instead of using the
recycled compositor.
To fix this, lets make BrowserViews hidden by default until they're
added to the window. See also #19988. This is a potentially breaking
change given that the initial value of
document.visibilityStatewillnow be
hidden, but given the experimental status of BrowserViews, Ithink this is a fine change to make. The old behavior can be restored
with
webPreferences: { show: true }.Notes: Fix flicker when switching between BrowserViews after creating new BrowserView