Bug 1364563 - Update render mode and fallback to software solution when GPU process is killed; r?dvander
MozReview-Commit-ID: 5Sewt2wtku8
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -1310,16 +1310,17 @@ ContentChild::RecvReinitRendering(Endpoi
return IPC_FAIL_NO_REASON(this);
}
if (!ImageBridgeChild::ReinitForContent(Move(aImageBridge), namespaces[2])) {
return IPC_FAIL_NO_REASON(this);
}
if (!gfx::VRManagerChild::ReinitForContent(Move(aVRBridge))) {
return IPC_FAIL_NO_REASON(this);
}
+ gfxPlatform::GetPlatform()->CompositorUpdated();
// Establish new PLayerTransactions.
for (const auto& tabChild : tabs) {
if (tabChild->LayersId()) {
tabChild->ReinitRendering();
}
}
--- a/gfx/ipc/GPUProcessManager.cpp
+++ b/gfx/ipc/GPUProcessManager.cpp
@@ -423,16 +423,27 @@ GPUProcessManager::OnRemoteProcessDevice
auto newTime = TimeStamp::Now();
auto delta = (int32_t)(newTime - mDeviceResetLastTime).ToMilliseconds();
mDeviceResetLastTime = newTime;
if (ShouldLimitDeviceResets(mDeviceResetCount, delta)) {
DestroyProcess();
DisableGPUProcess("GPU processed experienced too many device resets");
+ // Reaches the limited TDR attempts, fallback to software solution.
+ gfxConfig::SetFailed(Feature::HW_COMPOSITING,
+ FeatureStatus::Blocked,
+ "Too many attemps of D3D11 creation, fallback to software solution.");
+ gfxConfig::SetFailed(Feature::D3D11_COMPOSITING,
+ FeatureStatus::Blocked,
+ "Too many attemps of D3D11 creation, fallback to software solution.");
+ gfxConfig::SetFailed(Feature::DIRECT2D,
+ FeatureStatus::Blocked,
+ "Too many attemps of D3D11 creation, fallback to software solution.");
+
HandleProcessLost();
return;
}
RebuildRemoteSessions();
NotifyListenersOnCompositeDeviceReset();
}