forked from mirrors/gecko-dev
Backed out 3 changesets (bug 1820066) for causing xpc failures in widget/headless/tests/test_headless.js CLOSED TREE
Backed out changeset 501d93d8c9eb (bug 1820066) Backed out changeset ec623d25b138 (bug 1820066) Backed out changeset c34dfd018abb (bug 1820066)
This commit is contained in:
parent
56258a05fc
commit
39587cae6b
7 changed files with 8 additions and 31 deletions
|
|
@ -259,9 +259,6 @@ void CompositorBridgeParent::InitSameProcess(widget::CompositorWidget* aWidget,
|
||||||
|
|
||||||
mWidget = aWidget;
|
mWidget = aWidget;
|
||||||
mRootLayerTreeID = aLayerTreeId;
|
mRootLayerTreeID = aLayerTreeId;
|
||||||
#if defined(XP_WIN)
|
|
||||||
mWidget->AsWindows()->SetRootLayerTreeID(mRootLayerTreeID);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Initialize();
|
Initialize();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2807,19 +2807,11 @@ void gfxPlatform::InitWebRenderConfig() {
|
||||||
gfxVars::SetReuseDecoderDevice(true);
|
gfxVars::SetReuseDecoderDevice(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// SWAP_EFFECT_FLIP_SEQUENTIAL is strongly recommended on Win10+ machines --
|
if (Preferences::GetBool("gfx.webrender.flip-sequential", false)) {
|
||||||
// DXGI warnings are emitted by the Direct3D11 debug layer if it's not used.
|
|
||||||
//
|
|
||||||
// This avoids bug 1763981, which is only exhibited on Windows 11. (This may
|
|
||||||
// be due to some sort of raciness between the parent and GPU processes when
|
|
||||||
// no separate compositor-HWND is created. Alternatively, it may be a bug in
|
|
||||||
// Win11 DWM's handling of SWAP_EFFECT_SEQUENTIAL.)
|
|
||||||
if (Preferences::GetBool("gfx.webrender.flip-sequential", IsWin10OrLater())) {
|
|
||||||
if (gfxVars::UseWebRenderANGLE()) {
|
if (gfxVars::UseWebRenderANGLE()) {
|
||||||
gfxVars::SetUseWebRenderFlipSequentialWin(true);
|
gfxVars::SetUseWebRenderFlipSequentialWin(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Preferences::GetBool("gfx.webrender.triple-buffering.enabled", false)) {
|
if (Preferences::GetBool("gfx.webrender.triple-buffering.enabled", false)) {
|
||||||
if (gfxVars::UseWebRenderDCompWin() ||
|
if (gfxVars::UseWebRenderDCompWin() ||
|
||||||
gfxVars::UseWebRenderFlipSequentialWin()) {
|
gfxVars::UseWebRenderFlipSequentialWin()) {
|
||||||
|
|
|
||||||
|
|
@ -263,12 +263,11 @@ bool RenderCompositorANGLE::CreateSwapChain(nsACString& aError) {
|
||||||
desc.BufferCount = 2;
|
desc.BufferCount = 2;
|
||||||
}
|
}
|
||||||
desc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL;
|
desc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL;
|
||||||
desc.Scaling = DXGI_SCALING_NONE;
|
|
||||||
} else {
|
} else {
|
||||||
desc.BufferCount = 1;
|
desc.BufferCount = 1;
|
||||||
desc.SwapEffect = DXGI_SWAP_EFFECT_SEQUENTIAL;
|
desc.SwapEffect = DXGI_SWAP_EFFECT_SEQUENTIAL;
|
||||||
desc.Scaling = DXGI_SCALING_STRETCH;
|
|
||||||
}
|
}
|
||||||
|
desc.Scaling = DXGI_SCALING_NONE;
|
||||||
desc.Flags = 0;
|
desc.Flags = 0;
|
||||||
|
|
||||||
hr = dxgiFactory2->CreateSwapChainForHwnd(
|
hr = dxgiFactory2->CreateSwapChainForHwnd(
|
||||||
|
|
|
||||||
|
|
@ -460,7 +460,7 @@ pref("gfx.downloadable_fonts.disable_cache", false);
|
||||||
pref("gfx.content.azure.backends", "skia");
|
pref("gfx.content.azure.backends", "skia");
|
||||||
|
|
||||||
#ifdef XP_WIN
|
#ifdef XP_WIN
|
||||||
// pref("gfx.webrender.flip-sequential", false); // no default
|
pref("gfx.webrender.flip-sequential", false);
|
||||||
pref("gfx.webrender.dcomp-win.enabled", true);
|
pref("gfx.webrender.dcomp-win.enabled", true);
|
||||||
pref("gfx.webrender.triple-buffering.enabled", true);
|
pref("gfx.webrender.triple-buffering.enabled", true);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -360,15 +360,4 @@ void InProcessWinCompositorWidget::ObserveVsync(VsyncObserver* aObserver) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void InProcessWinCompositorWidget::UpdateCompositorWnd(
|
|
||||||
const HWND aCompositorWnd, const HWND aParentWnd) {
|
|
||||||
MOZ_ASSERT(layers::CompositorThreadHolder::IsInCompositorThread());
|
|
||||||
MOZ_ASSERT(aCompositorWnd && aParentWnd);
|
|
||||||
MOZ_ASSERT(aParentWnd == mWnd);
|
|
||||||
|
|
||||||
// Since we're in the parent process anyway, we can just call SetParent
|
|
||||||
// directly.
|
|
||||||
::SetParent(aCompositorWnd, aParentWnd);
|
|
||||||
mSetParentCompleted = true;
|
|
||||||
}
|
|
||||||
} // namespace mozilla::widget
|
} // namespace mozilla::widget
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ class InProcessWinCompositorWidget final
|
||||||
nsIWidget* RealWidget() override;
|
nsIWidget* RealWidget() override;
|
||||||
|
|
||||||
void UpdateCompositorWnd(const HWND aCompositorWnd,
|
void UpdateCompositorWnd(const HWND aCompositorWnd,
|
||||||
const HWND aParentWnd) override;
|
const HWND aParentWnd) override {}
|
||||||
void SetRootLayerTreeID(const layers::LayersId& aRootLayerTreeId) override {}
|
void SetRootLayerTreeID(const layers::LayersId& aRootLayerTreeId) override {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
||||||
|
|
@ -70,10 +70,10 @@ void WinCompositorWidget::UpdateCompositorWndSizeIfNecessary() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This code is racing with the compositor, which needs to reparent the
|
// This code is racing with the compositor, which needs to reparent
|
||||||
// compositor surface to the actual window (mWnd). To avoid racing mutations,
|
// the compositor surface to the actual window (mWnd). To avoid racing
|
||||||
// we refuse to proceed until ::SetParent() is called in the parent process.
|
// mutations, we refuse to proceed until ::SetParent() is called in parent
|
||||||
// After the ::SetParent() call, composition is scheduled in
|
// process. After the ::SetParent() call, composition is scheduled in
|
||||||
// CompositorWidgetParent::UpdateCompositorWnd().
|
// CompositorWidgetParent::UpdateCompositorWnd().
|
||||||
if (!mSetParentCompleted) {
|
if (!mSetParentCompleted) {
|
||||||
// ::SetParent() is not completed yet.
|
// ::SetParent() is not completed yet.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue