зеркало из https://github.com/mozilla/gecko-dev.git
Enable APZ for all Desktop windows if E10s is enabled. (bug 1163115, r=kats)
This commit is contained in:
Родитель
943736bd0c
Коммит
8a9daf3775
|
@ -49,6 +49,7 @@
|
|||
#include "nsDebug.h" // for NS_ASSERTION, etc
|
||||
#include "nsISupportsImpl.h" // for MOZ_COUNT_CTOR, etc
|
||||
#include "nsIWidget.h" // for nsIWidget
|
||||
#include "nsIXULRuntime.h" // for mozilla::BrowserTabsRemoteAutostart
|
||||
#include "nsTArray.h" // for nsTArray
|
||||
#include "nsThreadUtils.h" // for NS_IsMainThread
|
||||
#include "nsXULAppAPI.h" // for XRE_GetIOMessageLoop
|
||||
|
@ -664,10 +665,10 @@ CompositorParent::CompositorParent(nsIWidget* aWidget,
|
|||
if (gfxPrefs::AsyncPanZoomEnabled() &&
|
||||
#if !defined(MOZ_B2G) && !defined(MOZ_WIDGET_ANDROID)
|
||||
// For XUL applications (everything but B2G on mobile and desktop, and
|
||||
// Firefox on Android) we only want to use APZ in e10s-enabled windows.
|
||||
// If we ever get input events off the main thread we can consider
|
||||
// relaxing this requirement.
|
||||
aWidget->IsMultiProcessWindow() &&
|
||||
// Firefox on Android) we only want to use APZ when E10S is enabled. If
|
||||
// we ever get input events off the main thread we can consider relaxing
|
||||
// this requirement.
|
||||
mozilla::BrowserTabsRemoteAutostart() &&
|
||||
#endif
|
||||
(aWidget->WindowType() == eWindowType_toplevel || aWidget->WindowType() == eWindowType_child)) {
|
||||
mApzcTreeManager = new APZCTreeManager();
|
||||
|
|
|
@ -487,7 +487,6 @@ public:
|
|||
#endif
|
||||
|
||||
virtual void CreateCompositor() override;
|
||||
virtual bool IsMultiProcessWindow() override;
|
||||
virtual void PrepareWindowEffects() override;
|
||||
virtual void CleanupWindowEffects() override;
|
||||
virtual bool PreRender(LayerManagerComposite* aManager) override;
|
||||
|
|
|
@ -1929,16 +1929,6 @@ nsChildView::CreateCompositor()
|
|||
}
|
||||
}
|
||||
|
||||
bool
|
||||
nsChildView::IsMultiProcessWindow()
|
||||
{
|
||||
// On OS X the XULWindowWidget object gets the widget's init-data, which
|
||||
// is what has the electrolysis window flag. So here in the child view
|
||||
// we need to get the flag from that window instead.
|
||||
nsCocoaWindow* parent = GetXULWindowWidget();
|
||||
return parent ? parent->IsMultiProcessWindow() : false;
|
||||
}
|
||||
|
||||
void
|
||||
nsChildView::ConfigureAPZCTreeManager()
|
||||
{
|
||||
|
|
|
@ -295,7 +295,6 @@ void nsBaseWidget::BaseCreate(nsIWidget *aParent,
|
|||
mBorderStyle = aInitData->mBorderStyle;
|
||||
mPopupLevel = aInitData->mPopupLevel;
|
||||
mPopupType = aInitData->mPopupHint;
|
||||
mMultiProcessWindow = aInitData->mMultiProcessWindow;
|
||||
}
|
||||
|
||||
if (aParent) {
|
||||
|
@ -953,11 +952,6 @@ private:
|
|||
nsRefPtr<APZCTreeManager> mTreeManager;
|
||||
};
|
||||
|
||||
bool nsBaseWidget::IsMultiProcessWindow()
|
||||
{
|
||||
return mMultiProcessWindow;
|
||||
}
|
||||
|
||||
void nsBaseWidget::ConfigureAPZCTreeManager()
|
||||
{
|
||||
MOZ_ASSERT(mAPZC);
|
||||
|
|
|
@ -154,7 +154,6 @@ public:
|
|||
virtual CompositorParent* NewCompositorParent(int aSurfaceWidth, int aSurfaceHeight);
|
||||
virtual void CreateCompositor();
|
||||
virtual void CreateCompositor(int aWidth, int aHeight);
|
||||
virtual bool IsMultiProcessWindow() override;
|
||||
virtual void PrepareWindowEffects() override {}
|
||||
virtual void CleanupWindowEffects() override {}
|
||||
virtual bool PreRender(LayerManagerComposite* aManager) override { return true; }
|
||||
|
@ -482,7 +481,6 @@ protected:
|
|||
bool mUpdateCursor;
|
||||
nsBorderStyle mBorderStyle;
|
||||
bool mUseLayersAcceleration;
|
||||
bool mMultiProcessWindow;
|
||||
bool mUseAttachedEvents;
|
||||
nsIntRect mBounds;
|
||||
nsIntRect* mOriginalBounds;
|
||||
|
|
|
@ -1751,8 +1751,6 @@ class nsIWidget : public nsISupports {
|
|||
NS_IMETHOD DispatchEvent(mozilla::WidgetGUIEvent* event,
|
||||
nsEventStatus & aStatus) = 0;
|
||||
|
||||
virtual bool IsMultiProcessWindow() = 0;
|
||||
|
||||
/**
|
||||
* Dispatches an event that must be handled by APZ first, when APZ is
|
||||
* enabled. If invoked in the child process, it is forwarded to the
|
||||
|
|
|
@ -105,8 +105,7 @@ struct nsWidgetInitData {
|
|||
mIsDragPopup(false),
|
||||
mIsAnimationSuppressed(false),
|
||||
mSupportTranslucency(false),
|
||||
mMouseTransparent(false),
|
||||
mMultiProcessWindow(false)
|
||||
mMouseTransparent(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -132,8 +131,6 @@ struct nsWidgetInitData {
|
|||
// true if the window should be transparent to mouse events. Currently this is
|
||||
// only valid for eWindowType_popup widgets
|
||||
bool mMouseTransparent;
|
||||
// This flag designates windows with out-of-process tabs.
|
||||
bool mMultiProcessWindow;
|
||||
};
|
||||
|
||||
#endif // nsWidgetInitData_h__
|
||||
|
|
|
@ -534,9 +534,6 @@ nsAppShellService::JustCreateTopWindow(nsIXULWindow *aParent,
|
|||
if (aChromeMask & nsIWebBrowserChrome::CHROME_MAC_SUPPRESS_ANIMATION)
|
||||
widgetInitData.mIsAnimationSuppressed = true;
|
||||
|
||||
if (aChromeMask & nsIWebBrowserChrome::CHROME_REMOTE_WINDOW)
|
||||
widgetInitData.mMultiProcessWindow = true;
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
// Mac OS X sheet support
|
||||
// Adding CHROME_OPENAS_CHROME to sheetMask makes modal windows opened from
|
||||
|
|
Загрузка…
Ссылка в новой задаче