зеркало из 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) {
|
if (mDevice->GetDeviceRemovedReason() != S_OK) {
|
||||||
gfxCriticalNote << "GFX: D3D11 skip BeginFrame with device-removed.";
|
|
||||||
ReadUnlockTextures();
|
ReadUnlockTextures();
|
||||||
*aRenderBoundsOut = IntRect();
|
*aRenderBoundsOut = IntRect();
|
||||||
|
|
||||||
|
if (!mAttachments->IsDeviceReset()) {
|
||||||
|
gfxCriticalNote << "GFX: D3D11 skip BeginFrame with device-removed.";
|
||||||
|
|
||||||
// If we are in the GPU process then the main process doesn't
|
// 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
|
// know that a device reset has happened and needs to be informed
|
||||||
if (XRE_IsGPUProcess()) {
|
if (XRE_IsGPUProcess()) {
|
||||||
GPUParent::GetSingleton()->NotifyDeviceReset();
|
GPUParent::GetSingleton()->NotifyDeviceReset();
|
||||||
}
|
}
|
||||||
|
mAttachments->SetDeviceReset();
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,8 @@ DeviceAttachmentsD3D11::DeviceAttachmentsD3D11(ID3D11Device* device)
|
||||||
mMaximumTriangles(kInitialMaximumTriangles),
|
mMaximumTriangles(kInitialMaximumTriangles),
|
||||||
mDevice(device),
|
mDevice(device),
|
||||||
mContinueInit(true),
|
mContinueInit(true),
|
||||||
mInitialized(false)
|
mInitialized(false),
|
||||||
|
mDeviceReset(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -73,6 +73,13 @@ public:
|
||||||
RefPtr<IDXGIResource> mSyncTexture;
|
RefPtr<IDXGIResource> mSyncTexture;
|
||||||
HANDLE mSyncHandle;
|
HANDLE mSyncHandle;
|
||||||
|
|
||||||
|
void SetDeviceReset() {
|
||||||
|
mDeviceReset = true;
|
||||||
|
}
|
||||||
|
bool IsDeviceReset() const {
|
||||||
|
return mDeviceReset;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
explicit DeviceAttachmentsD3D11(ID3D11Device* device);
|
explicit DeviceAttachmentsD3D11(ID3D11Device* device);
|
||||||
~DeviceAttachmentsD3D11();
|
~DeviceAttachmentsD3D11();
|
||||||
|
@ -100,6 +107,7 @@ private:
|
||||||
RefPtr<ID3D11Device> mDevice;
|
RefPtr<ID3D11Device> mDevice;
|
||||||
bool mContinueInit;
|
bool mContinueInit;
|
||||||
bool mInitialized;
|
bool mInitialized;
|
||||||
|
bool mDeviceReset;
|
||||||
nsCString mInitFailureId;
|
nsCString mInitFailureId;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче