зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1749183 - Fix RenderThread::HandleDeviceReset() for simulate device reset r=gfx-reviewers,aosmond
Current RenderThread::HandleDeviceReset() does nothing for simulate device reset. Differential Revision: https://phabricator.services.mozilla.com/D135590
This commit is contained in:
Родитель
c1b142f453
Коммит
54e275e8ad
|
@ -867,7 +867,22 @@ static DeviceResetReason GLenumToResetReason(GLenum aReason) {
|
|||
void RenderThread::HandleDeviceReset(const char* aWhere, GLenum aReason) {
|
||||
MOZ_ASSERT(IsInRenderThread());
|
||||
|
||||
// This happens only on simulate device reset.
|
||||
if (aReason == LOCAL_GL_NO_ERROR) {
|
||||
MOZ_ASSERT(XRE_IsGPUProcess());
|
||||
|
||||
if (!mHandlingDeviceReset) {
|
||||
mHandlingDeviceReset = true;
|
||||
|
||||
MutexAutoLock lock(mRenderTextureMapLock);
|
||||
mRenderTexturesDeferred.clear();
|
||||
for (const auto& entry : mRenderTextures) {
|
||||
entry.second->ClearCachedResources();
|
||||
}
|
||||
// Simulate DeviceReset does not need to notify the device reset to
|
||||
// GPUProcessManager. It is already done by
|
||||
// GPUProcessManager::SimulateDeviceReset().
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче