diff --git a/gfx/layers/ipc/CompositorBridgeParent.cpp b/gfx/layers/ipc/CompositorBridgeParent.cpp index 4a337f5729d2..48c9853e660f 100644 --- a/gfx/layers/ipc/CompositorBridgeParent.cpp +++ b/gfx/layers/ipc/CompositorBridgeParent.cpp @@ -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. diff --git a/gfx/layers/ipc/CompositorBridgeParent.h b/gfx/layers/ipc/CompositorBridgeParent.h index 8bd607a72e0d..d15d23d2b145 100644 --- a/gfx/layers/ipc/CompositorBridgeParent.h +++ b/gfx/layers/ipc/CompositorBridgeParent.h @@ -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, diff --git a/gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp b/gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp index b85cb97d5ab4..d00876eb8951 100644 --- a/gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp +++ b/gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp @@ -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 diff --git a/gfx/layers/ipc/CrossProcessCompositorBridgeParent.h b/gfx/layers/ipc/CrossProcessCompositorBridgeParent.h index 4e9bc3508b1b..c5f4a3f333e7 100644 --- a/gfx/layers/ipc/CrossProcessCompositorBridgeParent.h +++ b/gfx/layers/ipc/CrossProcessCompositorBridgeParent.h @@ -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, diff --git a/gfx/layers/ipc/LayerTransactionParent.cpp b/gfx/layers/ipc/LayerTransactionParent.cpp index d50e0b2183a6..e4f0225f8987 100644 --- a/gfx/layers/ipc/LayerTransactionParent.cpp +++ b/gfx/layers/ipc/LayerTransactionParent.cpp @@ -844,7 +844,7 @@ LayerTransactionParent::RecvSetAsyncZoom(const FrameMetrics::ViewID& aScrollID, mozilla::ipc::IPCResult LayerTransactionParent::RecvFlushApzRepaints() { - mCompositorBridge->FlushApzRepaints(this); + mCompositorBridge->FlushApzRepaints(GetId()); return IPC_OK(); }