Bug 1562847 - Disable double buffering with compositor when device reset happens r=nical,bas

When double buffering is enable with compositor, DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL is used without DirectComposition. There are some devices that swap chain with DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL does not work well. In this case, device reset happens very often. To avoid the situation, the double buffering needs to be disabled when device reset happens.

Differential Revision: https://phabricator.services.mozilla.com/D36579
This commit is contained in:
sotaro
2019-07-09 06:37:45 +00:00
parent bc9aa71539
commit 04d00e3ba4
7 changed files with 41 additions and 38 deletions

View File

@@ -485,6 +485,11 @@ void GPUProcessManager::OnRemoteProcessDeviceReset(GPUProcessHost* aHost) {
// indicating that we should give up and use software
mDeviceResetCount++;
// Disable double buffering when device reset happens.
if (!gfxVars::UseWebRender() && gfxVars::UseDoubleBufferingWithCompositor()) {
gfxVars::SetUseDoubleBufferingWithCompositor(false);
}
auto newTime = TimeStamp::Now();
auto delta = (int32_t)(newTime - mDeviceResetLastTime).ToMilliseconds();
mDeviceResetLastTime = newTime;