From af301ad5dba93938803143f8d65b5fbca315fa4d Mon Sep 17 00:00:00 2001 From: Matt Woodrow Date: Thu, 5 Nov 2020 19:27:36 +0000 Subject: [PATCH] Bug 1673983 - Preload d3d11 attachments for CompositorD3D11 if we might use it with software WebRender. r=lsalzman Differential Revision: https://phabricator.services.mozilla.com/D95980 --- gfx/thebes/DeviceManagerDx.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gfx/thebes/DeviceManagerDx.cpp b/gfx/thebes/DeviceManagerDx.cpp index 41c80becdc12..3aecc77ead56 100644 --- a/gfx/thebes/DeviceManagerDx.cpp +++ b/gfx/thebes/DeviceManagerDx.cpp @@ -314,7 +314,7 @@ bool DeviceManagerDx::CreateCompositorDevices() { // Fallback from WR to D3D11 Non-WR compositor without re-creating gpu process // could happen when WR causes error. In this case, the attachments are loaded // synchronously. - if (!gfx::gfxVars::UseWebRender()) { + if (!gfx::gfxVars::UseWebRender() || gfx::gfxVars::UseSoftwareWebRender()) { PreloadAttachmentsOnCompositorThread(); } @@ -1429,7 +1429,8 @@ void DeviceManagerDx::PreloadAttachmentsOnCompositorThread() { return; } - bool enableAL = gfxConfig::IsEnabled(Feature::ADVANCED_LAYERS); + bool enableAL = gfxConfig::IsEnabled(Feature::ADVANCED_LAYERS) && + !gfx::gfxVars::UseSoftwareWebRender(); RefPtr task = NS_NewRunnableFunction( "DeviceManagerDx::PreloadAttachmentsOnCompositorThread",