Bug 604647: Never create swap chains while the device is lost. r=jrmuizel a=blocking-final

This commit is contained in:
Bas Schouten 2010-12-20 22:35:28 +00:00
parent c635e3f490
commit 402680c191

View File

@ -449,6 +449,15 @@ DeviceManagerD3D9::CreateSwapChain(HWND hWnd)
{
nsRefPtr<SwapChainD3D9> swapChain = new SwapChainD3D9(this);
// See bug 604647. This line means that if we create a window while the
// device is lost LayerManager initialization will fail, this window
// will be permanently unaccelerated. This should be a rare situation
// though and the need for a low-risk fix for this bug outweighs the
// downside.
if (!VerifyReadyForRendering()) {
return nsnull;
}
if (!swapChain->Init(hWnd)) {
return nsnull;
}