Bug 1588484 - Disable Advanced Layers for now when using fission for the window. r=kmag

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Matt Woodrow 2019-11-24 20:59:07 +00:00
Родитель ae587eeebc
Коммит 99f1ccd668
5 изменённых файлов: 22 добавлений и 3 удалений

Просмотреть файл

@ -4151,6 +4151,12 @@
value: false
mirror: always
# Whether we allow advanced layers with fission
- name: layers.advanced.fission.enabled
type: bool
value: false
mirror: always
# Whether we allow AMD switchable graphics.
- name: layers.amd-switchable-gfx.enabled
type: bool

Просмотреть файл

@ -54,6 +54,7 @@
#include "mozilla/StaticPrefs_apz.h"
#include "mozilla/StaticPrefs_dom.h"
#include "mozilla/StaticPrefs_layout.h"
#include "mozilla/StaticPrefs_layers.h"
#include "mozilla/Unused.h"
#include "mozilla/IMEStateManager.h"
#include "mozilla/VsyncDispatcher.h"
@ -72,7 +73,6 @@
#include "mozilla/gfx/gfxVars.h"
#include "mozilla/Move.h"
#include "mozilla/Sprintf.h"
#include "mozilla/StaticPrefs_layout.h"
#include "mozilla/webrender/WebRenderTypes.h"
#include "nsRefPtrHashtable.h"
#include "TouchEvents.h"
@ -172,6 +172,7 @@ nsBaseWidget::nsBaseWidget()
mPopupLevel(ePopupLevelTop),
mPopupType(ePopupTypeAny),
mHasRemoteContent(false),
mFissionWindow(false),
mUpdateCursor(true),
mUseAttachedEvents(false),
mIMEHasFocus(false),
@ -391,6 +392,7 @@ void nsBaseWidget::BaseCreate(nsIWidget* aParent, nsWidgetInitData* aInitData) {
mPopupLevel = aInitData->mPopupLevel;
mPopupType = aInitData->mPopupHint;
mHasRemoteContent = aInitData->mHasRemoteContent;
mFissionWindow = aInitData->mFissionWindow;
}
if (aParent) {
@ -1213,7 +1215,11 @@ already_AddRefed<LayerManager> nsBaseWidget::CreateCompositorSession(
bool enableAPZ = UseAPZ();
CompositorOptions options(enableAPZ, enableWR);
bool enableAL = gfx::gfxConfig::IsEnabled(gfx::Feature::ADVANCED_LAYERS);
// Bug 1588484 - Advanced Layers is currently disabled for fission windows,
// since it doesn't properly support nested RefLayers.
bool enableAL =
gfx::gfxConfig::IsEnabled(gfx::Feature::ADVANCED_LAYERS) &&
(!mFissionWindow || StaticPrefs::layers_advanced_fission_enabled());
options.SetUseAdvancedLayers(enableAL);
#ifdef MOZ_WIDGET_ANDROID

Просмотреть файл

@ -691,6 +691,7 @@ class nsBaseWidget : public nsIWidget, public nsSupportsWeakReference {
nsPopupType mPopupType;
SizeConstraints mSizeConstraints;
bool mHasRemoteContent;
bool mFissionWindow;
bool mUpdateCursor;
bool mUseAttachedEvents;

Просмотреть файл

@ -112,7 +112,8 @@ struct nsWidgetInitData {
mMouseTransparent(false),
mHasRemoteContent(false),
mAlwaysOnTop(false),
mPIPWindow(false) {}
mPIPWindow(false),
mFissionWindow(false) {}
nsWindowType mWindowType;
nsBorderStyle mBorderStyle;
@ -140,6 +141,8 @@ struct nsWidgetInitData {
bool mAlwaysOnTop;
// Is PictureInPicture window
bool mPIPWindow;
// True if fission is enabled for this window
bool mFissionWindow;
};
#endif // nsWidgetInitData_h__

Просмотреть файл

@ -593,6 +593,9 @@ nsresult nsAppShellService::JustCreateTopWindow(
if (aChromeMask & nsIWebBrowserChrome::CHROME_ALWAYS_ON_TOP)
widgetInitData.mAlwaysOnTop = true;
if (aChromeMask & nsIWebBrowserChrome::CHROME_FISSION_WINDOW)
widgetInitData.mFissionWindow = true;
#ifdef MOZ_WIDGET_GTK
// Linux/Gtk PIP window support. It's Chrome Toplevel window, always on top
// and without any bar.