mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 20:35:50 +00:00
Backed out changeset a170dabfd12b (bug 997365) for wrong bug nummer in commit message on a CLOSED TREE
This commit is contained in:
parent
ccc8da0467
commit
07b626f601
@ -1015,9 +1015,6 @@ EraseLayerState(uint64_t aId)
|
||||
CompositorParent::DeallocateLayerTreeId(uint64_t aId)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
// Here main thread notifies compositor to remove an element from
|
||||
// sIndirectLayerTrees. This removed element might be queried soon.
|
||||
// Checking the elements of sIndirectLayerTrees exist or not before using.
|
||||
CompositorLoop()->PostTask(FROM_HERE,
|
||||
NewRunnableFunction(&EraseLayerState, aId));
|
||||
}
|
||||
@ -1239,15 +1236,9 @@ CrossProcessCompositorParent::AllocPLayerTransactionParent(const nsTArray<Layers
|
||||
{
|
||||
MOZ_ASSERT(aId != 0);
|
||||
|
||||
CompositorParent::LayerTreeState* state = nullptr;
|
||||
LayerTreeMap::iterator itr = sIndirectLayerTrees.find(aId);
|
||||
if (sIndirectLayerTrees.end() != itr) {
|
||||
state = &itr->second;
|
||||
}
|
||||
|
||||
if (state && state->mLayerManager) {
|
||||
state->mCrossProcessParent = this;
|
||||
LayerManagerComposite* lm = state->mLayerManager;
|
||||
if (sIndirectLayerTrees[aId].mLayerManager) {
|
||||
sIndirectLayerTrees[aId].mCrossProcessParent = this;
|
||||
LayerManagerComposite* lm = sIndirectLayerTrees[aId].mLayerManager;
|
||||
*aTextureFactoryIdentifier = lm->GetCompositor()->GetTextureFactoryIdentifier();
|
||||
*aSuccess = true;
|
||||
LayerTransactionParent* p = new LayerTransactionParent(lm, this, aId);
|
||||
@ -1276,13 +1267,7 @@ CrossProcessCompositorParent::DeallocPLayerTransactionParent(PLayerTransactionPa
|
||||
bool
|
||||
CrossProcessCompositorParent::RecvNotifyChildCreated(const uint64_t& child)
|
||||
{
|
||||
const CompositorParent::LayerTreeState* state = CompositorParent::GetIndirectShadowTree(child);
|
||||
if (!state) {
|
||||
return false;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(state->mParent);
|
||||
state->mParent->NotifyChildCreated(child);
|
||||
sIndirectLayerTrees[child].mParent->NotifyChildCreated(child);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1296,13 +1281,9 @@ CrossProcessCompositorParent::ShadowLayersUpdated(
|
||||
uint64_t id = aLayerTree->GetId();
|
||||
|
||||
MOZ_ASSERT(id != 0);
|
||||
MOZ_ASSERT(sIndirectLayerTrees[id].mParent);
|
||||
|
||||
const CompositorParent::LayerTreeState* state = CompositorParent::GetIndirectShadowTree(id);
|
||||
if (!state) {
|
||||
return;
|
||||
}
|
||||
MOZ_ASSERT(state->mParent);
|
||||
state->mParent->ScheduleRotationOnCompositorThread(aTargetConfig, aIsFirstPaint);
|
||||
sIndirectLayerTrees[id].mParent->ScheduleRotationOnCompositorThread(aTargetConfig, aIsFirstPaint);
|
||||
|
||||
Layer* shadowRoot = aLayerTree->GetRoot();
|
||||
if (shadowRoot) {
|
||||
@ -1310,7 +1291,7 @@ CrossProcessCompositorParent::ShadowLayersUpdated(
|
||||
}
|
||||
UpdateIndirectTree(id, shadowRoot, aTargetConfig);
|
||||
|
||||
state->mParent->NotifyShadowTreeTransaction(id, aIsFirstPaint, aScheduleComposite);
|
||||
sIndirectLayerTrees[id].mParent->NotifyShadowTreeTransaction(id, aIsFirstPaint, aScheduleComposite);
|
||||
}
|
||||
|
||||
void
|
||||
@ -1327,13 +1308,7 @@ CrossProcessCompositorParent::SetTestSampleTime(
|
||||
{
|
||||
uint64_t id = aLayerTree->GetId();
|
||||
MOZ_ASSERT(id != 0);
|
||||
const CompositorParent::LayerTreeState* state = CompositorParent::GetIndirectShadowTree(id);
|
||||
if (!state) {
|
||||
return false;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(state->mParent);
|
||||
return state->mParent->SetTestSampleTime(aLayerTree, aTime);
|
||||
return sIndirectLayerTrees[id].mParent->SetTestSampleTime(aLayerTree, aTime);
|
||||
}
|
||||
|
||||
void
|
||||
@ -1341,26 +1316,14 @@ CrossProcessCompositorParent::LeaveTestMode(LayerTransactionParent* aLayerTree)
|
||||
{
|
||||
uint64_t id = aLayerTree->GetId();
|
||||
MOZ_ASSERT(id != 0);
|
||||
const CompositorParent::LayerTreeState* state = CompositorParent::GetIndirectShadowTree(id);
|
||||
if (!state) {
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(state->mParent);
|
||||
state->mParent->LeaveTestMode(aLayerTree);
|
||||
sIndirectLayerTrees[id].mParent->LeaveTestMode(aLayerTree);
|
||||
}
|
||||
|
||||
AsyncCompositionManager*
|
||||
CrossProcessCompositorParent::GetCompositionManager(LayerTransactionParent* aLayerTree)
|
||||
{
|
||||
uint64_t id = aLayerTree->GetId();
|
||||
const CompositorParent::LayerTreeState* state = CompositorParent::GetIndirectShadowTree(id);
|
||||
if (!state) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(state->mParent);
|
||||
return state->mParent->GetCompositionManager(aLayerTree);
|
||||
return sIndirectLayerTrees[id].mParent->GetCompositionManager(aLayerTree);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user