зеркало из https://github.com/mozilla/gecko-dev.git
Cut down on compositor spam after a device reset. (bug 1363126 part 5, r=rhunt)
This commit is contained in:
Родитель
1118ca109b
Коммит
b76228bd31
|
@ -976,16 +976,19 @@ CompositorD3D11::BeginFrame(const nsIntRegion& aInvalidRegion,
|
|||
}
|
||||
|
||||
if (mDevice->GetDeviceRemovedReason() != S_OK) {
|
||||
gfxCriticalNote << "GFX: D3D11 skip BeginFrame with device-removed.";
|
||||
ReadUnlockTextures();
|
||||
*aRenderBoundsOut = IntRect();
|
||||
|
||||
// If we are in the GPU process then the main process doesn't
|
||||
// know that a device reset has happened and needs to be informed
|
||||
if (XRE_IsGPUProcess()) {
|
||||
GPUParent::GetSingleton()->NotifyDeviceReset();
|
||||
}
|
||||
if (!mAttachments->IsDeviceReset()) {
|
||||
gfxCriticalNote << "GFX: D3D11 skip BeginFrame with device-removed.";
|
||||
|
||||
// If we are in the GPU process then the main process doesn't
|
||||
// know that a device reset has happened and needs to be informed
|
||||
if (XRE_IsGPUProcess()) {
|
||||
GPUParent::GetSingleton()->NotifyDeviceReset();
|
||||
}
|
||||
mAttachments->SetDeviceReset();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,8 @@ DeviceAttachmentsD3D11::DeviceAttachmentsD3D11(ID3D11Device* device)
|
|||
mMaximumTriangles(kInitialMaximumTriangles),
|
||||
mDevice(device),
|
||||
mContinueInit(true),
|
||||
mInitialized(false)
|
||||
mInitialized(false),
|
||||
mDeviceReset(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -73,6 +73,13 @@ public:
|
|||
RefPtr<IDXGIResource> mSyncTexture;
|
||||
HANDLE mSyncHandle;
|
||||
|
||||
void SetDeviceReset() {
|
||||
mDeviceReset = true;
|
||||
}
|
||||
bool IsDeviceReset() const {
|
||||
return mDeviceReset;
|
||||
}
|
||||
|
||||
private:
|
||||
explicit DeviceAttachmentsD3D11(ID3D11Device* device);
|
||||
~DeviceAttachmentsD3D11();
|
||||
|
@ -100,6 +107,7 @@ private:
|
|||
RefPtr<ID3D11Device> mDevice;
|
||||
bool mContinueInit;
|
||||
bool mInitialized;
|
||||
bool mDeviceReset;
|
||||
nsCString mInitFailureId;
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче