Bug 1367837 - Have the CompositorBridgeParent::FlushApzRepaints function take a layers id instead of a layer tree. r=dvander

This is helpful for reusing the FlushApzRepaints from
WebRenderBridgeParent, since it no longer assumes there's a layers
transaction object.

MozReview-Commit-ID: GVqDDEeZaN3
This commit is contained in:
Kartikaya Gupta 2017-05-28 07:48:29 -04:00
Родитель c3d1217b06
Коммит 71133b7ca0
5 изменённых файлов: 10 добавлений и 11 удалений

Просмотреть файл

@ -1308,10 +1308,10 @@ CompositorBridgeParent::RecvGetFrameUniformity(FrameUniformityData* aOutData)
}
void
CompositorBridgeParent::FlushApzRepaints(const LayerTransactionParent* aLayerTree)
CompositorBridgeParent::FlushApzRepaints(const uint64_t& aLayersId)
{
MOZ_ASSERT(mApzcTreeManager);
uint64_t layersId = aLayerTree->GetId();
uint64_t layersId = aLayersId;
if (layersId == 0) {
// The request is coming from the parent-process layer tree, so we should
// use the compositor's root layer tree id.

Просмотреть файл

@ -108,7 +108,7 @@ public:
virtual void LeaveTestMode(LayerTransactionParent* aLayerTree) { }
virtual void ApplyAsyncProperties(LayerTransactionParent* aLayerTree) = 0;
virtual CompositorAnimationStorage* GetAnimationStorage(const uint64_t& aId) { return nullptr; }
virtual void FlushApzRepaints(const LayerTransactionParent* aLayerTree) = 0;
virtual void FlushApzRepaints(const uint64_t& aLayersId) = 0;
virtual void GetAPZTestData(const LayerTransactionParent* aLayerTree,
APZTestData* aOutData) { }
virtual void SetConfirmedTargetAPZC(const LayerTransactionParent* aLayerTree,
@ -231,7 +231,7 @@ public:
virtual void ApplyAsyncProperties(LayerTransactionParent* aLayerTree)
override;
virtual CompositorAnimationStorage* GetAnimationStorage(const uint64_t& aId) override;
virtual void FlushApzRepaints(const LayerTransactionParent* aLayerTree) override;
virtual void FlushApzRepaints(const uint64_t& aLayersId) override;
virtual void GetAPZTestData(const LayerTransactionParent* aLayerTree,
APZTestData* aOutData) override;
virtual void SetConfirmedTargetAPZC(const LayerTransactionParent* aLayerTree,

Просмотреть файл

@ -422,18 +422,17 @@ CrossProcessCompositorBridgeParent::GetAnimationStorage(
}
void
CrossProcessCompositorBridgeParent::FlushApzRepaints(const LayerTransactionParent* aLayerTree)
CrossProcessCompositorBridgeParent::FlushApzRepaints(const uint64_t& aLayersId)
{
uint64_t id = aLayerTree->GetId();
MOZ_ASSERT(id != 0);
MOZ_ASSERT(aLayersId != 0);
const CompositorBridgeParent::LayerTreeState* state =
CompositorBridgeParent::GetIndirectShadowTree(id);
CompositorBridgeParent::GetIndirectShadowTree(aLayersId);
if (!state) {
return;
}
MOZ_ASSERT(state->mParent);
state->mParent->FlushApzRepaints(aLayerTree);
state->mParent->FlushApzRepaints(aLayersId);
}
void

Просмотреть файл

@ -104,7 +104,7 @@ public:
override;
virtual CompositorAnimationStorage*
GetAnimationStorage(const uint64_t& aId) override;
virtual void FlushApzRepaints(const LayerTransactionParent* aLayerTree) override;
virtual void FlushApzRepaints(const uint64_t& aLayersId) override;
virtual void GetAPZTestData(const LayerTransactionParent* aLayerTree,
APZTestData* aOutData) override;
virtual void SetConfirmedTargetAPZC(const LayerTransactionParent* aLayerTree,

Просмотреть файл

@ -844,7 +844,7 @@ LayerTransactionParent::RecvSetAsyncZoom(const FrameMetrics::ViewID& aScrollID,
mozilla::ipc::IPCResult
LayerTransactionParent::RecvFlushApzRepaints()
{
mCompositorBridge->FlushApzRepaints(this);
mCompositorBridge->FlushApzRepaints(GetId());
return IPC_OK();
}