Bug 1582042 - Remove nsIRemoteTab.forceRepaint(). r=mconley

It's useless if the tab is already visible (i.e., has renderLayers=true), per
the previous patches, and that's the only point at which it gets called.

Differential Revision: https://phabricator.services.mozilla.com/D47131

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Emilio Cobos Álvarez 2019-09-26 22:11:50 +00:00
parent fa6f012317
commit 69d84b1151
6 changed files with 0 additions and 44 deletions

View File

@ -1100,9 +1100,6 @@ class AsyncTabSwitcher {
this.requestedTab = tab;
if (tabState == this.STATE_LOADED) {
this.maybeVisibleTabs.clear();
if (tab.linkedBrowser.isRemoteBrowser) {
tab.linkedBrowser.forceRepaint();
}
}
tab.linkedBrowser.setAttribute("primary", "true");

View File

@ -33,13 +33,6 @@ interface nsIRemoteTab : nsISupports
*/
readonly attribute boolean hasLayers;
/**
* Sends a message to the child ensuring that they paint as early as
* possible. This will send the message to paint even if renderLayers
* is already true.
*/
void forceRepaint();
/**
* Adjusts the tab's active state in the process priority manager,
* allowing its process to be given a lower priority.

View File

@ -195,17 +195,6 @@ BrowserHost::GetHasLayers(bool* aHasLayers) {
return NS_OK;
}
/* void forceRepaint (); */
NS_IMETHODIMP
BrowserHost::ForceRepaint(void) {
if (!mRoot) {
return NS_OK;
}
VisitAll(
[](BrowserParent* aBrowserParent) { aBrowserParent->ForceRepaint(); });
return NS_OK;
}
/* void resolutionChanged (); */
NS_IMETHODIMP
BrowserHost::NotifyResolutionChanged(void) {

View File

@ -3315,18 +3315,6 @@ void BrowserParent::PreserveLayers(bool aPreserveLayers) {
mPreserveLayers = aPreserveLayers;
}
void BrowserParent::ForceRepaint() {
if (!mActiveInPriorityManager) {
// If a tab is left and then returned to very rapidly, it can be
// deprioritized without losing its loaded status. In this case we won't
// go through SetRenderLayers.
mActiveInPriorityManager = true;
ProcessPriorityManager::TabActivityChanged(this, true);
}
SetRenderLayersInternal(true /* aEnabled */);
}
void BrowserParent::NotifyResolutionChanged() {
if (!mIsDestroyed) {
// TryCacheDPIAndScale()'s cache is keyed off of

View File

@ -730,7 +730,6 @@ class BrowserParent final : public PBrowserParent,
bool GetRenderLayers();
void SetRenderLayers(bool aRenderLayers);
void PreserveLayers(bool aPreserveLayers);
void ForceRepaint();
void NotifyResolutionChanged();
void Deprioritize();

View File

@ -1039,16 +1039,6 @@
}
}
forceRepaint() {
if (!this.isRemoteBrowser) {
return;
}
let { frameLoader } = this;
if (frameLoader && frameLoader.remoteTab) {
frameLoader.remoteTab.forceRepaint();
}
}
getTabBrowser() {
if (
this.ownerGlobal.gBrowser &&