Bug 630197: Check for a removed device before presenting. r=jrmuizel

This commit is contained in:
Bas Schouten 2013-04-09 17:37:56 +00:00
parent d7b350faee
commit 040e4ed63e

View File

@ -755,6 +755,17 @@ LayerManagerD3D10::Render(EndTransactionFlags aFlags)
static_cast<LayerD3D10*>(mRoot->ImplData())->RenderLayer();
// See bug 630197 - we have some reasons to believe if an earlier call
// returned an error, the upcoming present call may raise an exception.
// This will check if any of the calls done recently has returned an error
// and bails on composition. On the -next- frame we will then abandon
// hardware acceleration from gfxWindowsPlatform::VerifyD2DDevice.
// This might not be the 'optimal' solution but it will help us assert
// whether our thoughts of the causes of the issues are correct.
if (FAILED(mDevice->GetDeviceRemovedReason())) {
return;
}
if (mTarget) {
PaintToTarget();
} else if (mBackBuffer) {