зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1891180 - Move timeout check to end of WebRenderAPI::CheckIsRemoteTextureReady() r=gfx-reviewers,lsalzman
It is better to move timeout check to end of the function, since current implementation does not call RemoteTextureMap::CheckRemoteTextureReady() if the timeout is detected. Differential Revision: https://phabricator.services.mozilla.com/D207334
This commit is contained in:
Родитель
5302f0e6ba
Коммит
89cee0b835
|
@ -537,6 +537,20 @@ bool WebRenderAPI::CheckIsRemoteTextureReady(
|
|||
layers::CompositorThread()->Dispatch(runnable.forget());
|
||||
};
|
||||
|
||||
bool isReady = true;
|
||||
while (!aList->mList.empty() && isReady) {
|
||||
auto& front = aList->mList.front();
|
||||
isReady &= layers::RemoteTextureMap::Get()->CheckRemoteTextureReady(
|
||||
front, callback);
|
||||
if (isReady) {
|
||||
aList->mList.pop();
|
||||
}
|
||||
}
|
||||
|
||||
if (isReady) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const auto maxWaitDurationMs = 10000;
|
||||
const auto now = TimeStamp::Now();
|
||||
const auto waitDurationMs =
|
||||
|
@ -548,20 +562,7 @@ bool WebRenderAPI::CheckIsRemoteTextureReady(
|
|||
gfxCriticalNote << "RemoteTexture ready timeout";
|
||||
}
|
||||
|
||||
bool isReady = true;
|
||||
while (!aList->mList.empty() && isReady) {
|
||||
auto& front = aList->mList.front();
|
||||
isReady &= layers::RemoteTextureMap::Get()->CheckRemoteTextureReady(
|
||||
front, callback);
|
||||
if (isTimeout) {
|
||||
isReady = true;
|
||||
}
|
||||
if (isReady) {
|
||||
aList->mList.pop();
|
||||
}
|
||||
}
|
||||
|
||||
return isReady;
|
||||
return false;
|
||||
}
|
||||
|
||||
void WebRenderAPI::WaitRemoteTextureReady(
|
||||
|
|
Загрузка…
Ссылка в новой задаче