зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
56258a05fc
Коммит
39587cae6b
|
@ -259,9 +259,6 @@ void CompositorBridgeParent::InitSameProcess(widget::CompositorWidget* aWidget,
|
|||
|
||||
mWidget = aWidget;
|
||||
mRootLayerTreeID = aLayerTreeId;
|
||||
#if defined(XP_WIN)
|
||||
mWidget->AsWindows()->SetRootLayerTreeID(mRootLayerTreeID);
|
||||
#endif
|
||||
|
||||
Initialize();
|
||||
}
|
||||
|
|
|
@ -2807,19 +2807,11 @@ void gfxPlatform::InitWebRenderConfig() {
|
|||
gfxVars::SetReuseDecoderDevice(true);
|
||||
}
|
||||
|
||||
// SWAP_EFFECT_FLIP_SEQUENTIAL is strongly recommended on Win10+ machines --
|
||||
// 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 (Preferences::GetBool("gfx.webrender.flip-sequential", false)) {
|
||||
if (gfxVars::UseWebRenderANGLE()) {
|
||||
gfxVars::SetUseWebRenderFlipSequentialWin(true);
|
||||
}
|
||||
}
|
||||
|
||||
if (Preferences::GetBool("gfx.webrender.triple-buffering.enabled", false)) {
|
||||
if (gfxVars::UseWebRenderDCompWin() ||
|
||||
gfxVars::UseWebRenderFlipSequentialWin()) {
|
||||
|
|
|
@ -263,12 +263,11 @@ bool RenderCompositorANGLE::CreateSwapChain(nsACString& aError) {
|
|||
desc.BufferCount = 2;
|
||||
}
|
||||
desc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL;
|
||||
desc.Scaling = DXGI_SCALING_NONE;
|
||||
} else {
|
||||
desc.BufferCount = 1;
|
||||
desc.SwapEffect = DXGI_SWAP_EFFECT_SEQUENTIAL;
|
||||
desc.Scaling = DXGI_SCALING_STRETCH;
|
||||
}
|
||||
desc.Scaling = DXGI_SCALING_NONE;
|
||||
desc.Flags = 0;
|
||||
|
||||
hr = dxgiFactory2->CreateSwapChainForHwnd(
|
||||
|
|
|
@ -460,7 +460,7 @@ pref("gfx.downloadable_fonts.disable_cache", false);
|
|||
pref("gfx.content.azure.backends", "skia");
|
||||
|
||||
#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.triple-buffering.enabled", true);
|
||||
#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
|
||||
|
|
|
@ -71,7 +71,7 @@ class InProcessWinCompositorWidget final
|
|||
nsIWidget* RealWidget() override;
|
||||
|
||||
void UpdateCompositorWnd(const HWND aCompositorWnd,
|
||||
const HWND aParentWnd) override;
|
||||
const HWND aParentWnd) override {}
|
||||
void SetRootLayerTreeID(const layers::LayersId& aRootLayerTreeId) override {}
|
||||
|
||||
private:
|
||||
|
|
|
@ -70,10 +70,10 @@ void WinCompositorWidget::UpdateCompositorWndSizeIfNecessary() {
|
|||
return;
|
||||
}
|
||||
|
||||
// This code is racing with the compositor, which needs to reparent the
|
||||
// compositor surface to the actual window (mWnd). To avoid racing mutations,
|
||||
// we refuse to proceed until ::SetParent() is called in the parent process.
|
||||
// After the ::SetParent() call, composition is scheduled in
|
||||
// This code is racing with the compositor, which needs to reparent
|
||||
// the compositor surface to the actual window (mWnd). To avoid racing
|
||||
// mutations, we refuse to proceed until ::SetParent() is called in parent
|
||||
// process. After the ::SetParent() call, composition is scheduled in
|
||||
// CompositorWidgetParent::UpdateCompositorWnd().
|
||||
if (!mSetParentCompleted) {
|
||||
// ::SetParent() is not completed yet.
|
||||
|
|
Загрузка…
Ссылка в новой задаче