зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1449982 - Don't hold the sIndirectLayerTreesLock unnecessarily while notifying APZ of a layer tree removal. r=botond
MozReview-Commit-ID: 2OqbmMHCxn9 --HG-- extra : rebase_source : ec94523ba6d56a0c9cbfe3bf1a35bfaf2ba4687c
This commit is contained in:
Родитель
50cb7a4f32
Коммит
42eff13cf2
|
@ -1828,18 +1828,22 @@ CompositorBridgeParent::GetTestingTimeStamp() const
|
|||
void
|
||||
EraseLayerState(LayersId aId)
|
||||
{
|
||||
MonitorAutoLock lock(*sIndirectLayerTreesLock);
|
||||
RefPtr<APZUpdater> apz;
|
||||
|
||||
auto iter = sIndirectLayerTrees.find(aId);
|
||||
if (iter != sIndirectLayerTrees.end()) {
|
||||
CompositorBridgeParent* parent = iter->second.mParent;
|
||||
if (parent) {
|
||||
if (RefPtr<APZUpdater> apz = parent->GetAPZUpdater()) {
|
||||
apz->NotifyLayerTreeRemoved(aId);
|
||||
{ // scope lock
|
||||
MonitorAutoLock lock(*sIndirectLayerTreesLock);
|
||||
auto iter = sIndirectLayerTrees.find(aId);
|
||||
if (iter != sIndirectLayerTrees.end()) {
|
||||
CompositorBridgeParent* parent = iter->second.mParent;
|
||||
if (parent) {
|
||||
apz = parent->GetAPZUpdater();
|
||||
}
|
||||
sIndirectLayerTrees.erase(iter);
|
||||
}
|
||||
}
|
||||
|
||||
sIndirectLayerTrees.erase(iter);
|
||||
if (apz) {
|
||||
apz->NotifyLayerTreeRemoved(aId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче