mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 1154739 - On desktop platforms, only enable APZ in e10s windows. r=dvander,mstange
This commit is contained in:
parent
57b4bbe2ca
commit
f300e99712
@ -479,6 +479,7 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
virtual void CreateCompositor() override;
|
virtual void CreateCompositor() override;
|
||||||
|
virtual bool IsMultiProcessWindow() override;
|
||||||
virtual void PrepareWindowEffects() override;
|
virtual void PrepareWindowEffects() override;
|
||||||
virtual void CleanupWindowEffects() override;
|
virtual void CleanupWindowEffects() override;
|
||||||
virtual bool PreRender(LayerManagerComposite* aManager) override;
|
virtual bool PreRender(LayerManagerComposite* aManager) override;
|
||||||
|
@ -1885,6 +1885,16 @@ 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
|
void
|
||||||
nsChildView::ConfigureAPZCTreeManager()
|
nsChildView::ConfigureAPZCTreeManager()
|
||||||
{
|
{
|
||||||
|
@ -953,6 +953,10 @@ private:
|
|||||||
nsRefPtr<APZCTreeManager> mTreeManager;
|
nsRefPtr<APZCTreeManager> mTreeManager;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bool nsBaseWidget::IsMultiProcessWindow()
|
||||||
|
{
|
||||||
|
return mMultiProcessWindow;
|
||||||
|
}
|
||||||
|
|
||||||
void nsBaseWidget::ConfigureAPZCTreeManager()
|
void nsBaseWidget::ConfigureAPZCTreeManager()
|
||||||
{
|
{
|
||||||
@ -1145,6 +1149,12 @@ void nsBaseWidget::CreateCompositor(int aWidth, int aHeight)
|
|||||||
mCompositorParent->SetOtherProcessId(base::GetCurrentProcId());
|
mCompositorParent->SetOtherProcessId(base::GetCurrentProcId());
|
||||||
|
|
||||||
if (gfxPrefs::AsyncPanZoomEnabled() &&
|
if (gfxPrefs::AsyncPanZoomEnabled() &&
|
||||||
|
#if defined(XP_WIN) || defined(MOZ_WIDGET_COCOA) || defined(MOZ_WIDGET_GTK)
|
||||||
|
// For desktop platforms 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.
|
||||||
|
IsMultiProcessWindow() &&
|
||||||
|
#endif
|
||||||
(WindowType() == eWindowType_toplevel || WindowType() == eWindowType_child)) {
|
(WindowType() == eWindowType_toplevel || WindowType() == eWindowType_child)) {
|
||||||
ConfigureAPZCTreeManager();
|
ConfigureAPZCTreeManager();
|
||||||
}
|
}
|
||||||
|
@ -154,6 +154,7 @@ public:
|
|||||||
virtual CompositorParent* NewCompositorParent(int aSurfaceWidth, int aSurfaceHeight);
|
virtual CompositorParent* NewCompositorParent(int aSurfaceWidth, int aSurfaceHeight);
|
||||||
virtual void CreateCompositor();
|
virtual void CreateCompositor();
|
||||||
virtual void CreateCompositor(int aWidth, int aHeight);
|
virtual void CreateCompositor(int aWidth, int aHeight);
|
||||||
|
virtual bool IsMultiProcessWindow();
|
||||||
virtual void PrepareWindowEffects() override {}
|
virtual void PrepareWindowEffects() override {}
|
||||||
virtual void CleanupWindowEffects() override {}
|
virtual void CleanupWindowEffects() override {}
|
||||||
virtual bool PreRender(LayerManagerComposite* aManager) override { return true; }
|
virtual bool PreRender(LayerManagerComposite* aManager) override { return true; }
|
||||||
|
Loading…
Reference in New Issue
Block a user