diff --git a/gfx/layers/ipc/CompositorBridgeParent.cpp b/gfx/layers/ipc/CompositorBridgeParent.cpp index 06cdce6668f0..b5666d174547 100644 --- a/gfx/layers/ipc/CompositorBridgeParent.cpp +++ b/gfx/layers/ipc/CompositorBridgeParent.cpp @@ -1266,7 +1266,7 @@ CompositorBridgeParent::ForceComposite(LayerTransactionParent* aLayerTree) } bool -CompositorBridgeParent::SetTestSampleTime(LayerTransactionParent* aLayerTree, +CompositorBridgeParent::SetTestSampleTime(const uint64_t& aId, const TimeStamp& aTime) { if (aTime.IsNull()) { @@ -1295,7 +1295,7 @@ CompositorBridgeParent::SetTestSampleTime(LayerTransactionParent* aLayerTree, } void -CompositorBridgeParent::LeaveTestMode(LayerTransactionParent* aLayerTree) +CompositorBridgeParent::LeaveTestMode(const uint64_t& aId) { mIsTesting = false; } diff --git a/gfx/layers/ipc/CompositorBridgeParent.h b/gfx/layers/ipc/CompositorBridgeParent.h index 415cac05c482..b639688e6194 100644 --- a/gfx/layers/ipc/CompositorBridgeParent.h +++ b/gfx/layers/ipc/CompositorBridgeParent.h @@ -106,9 +106,9 @@ public: virtual void NotifyClearCachedResources(LayerTransactionParent* aLayerTree) { } virtual void ForceComposite(LayerTransactionParent* aLayerTree) { } - virtual bool SetTestSampleTime(LayerTransactionParent* aLayerTree, + virtual bool SetTestSampleTime(const uint64_t& aId, const TimeStamp& aTime) { return true; } - virtual void LeaveTestMode(LayerTransactionParent* aLayerTree) { } + virtual void LeaveTestMode(const uint64_t& aId) { } virtual void ApplyAsyncProperties(LayerTransactionParent* aLayerTree) = 0; virtual CompositorAnimationStorage* GetAnimationStorage(const uint64_t& aId) { return nullptr; } virtual void FlushApzRepaints(const uint64_t& aLayersId) = 0; @@ -230,9 +230,9 @@ public: const TransactionInfo& aInfo, bool aHitTestUpdate) override; virtual void ForceComposite(LayerTransactionParent* aLayerTree) override; - virtual bool SetTestSampleTime(LayerTransactionParent* aLayerTree, + virtual bool SetTestSampleTime(const uint64_t& aId, const TimeStamp& aTime) override; - virtual void LeaveTestMode(LayerTransactionParent* aLayerTree) override; + virtual void LeaveTestMode(const uint64_t& aId) override; virtual void ApplyAsyncProperties(LayerTransactionParent* aLayerTree) override; virtual CompositorAnimationStorage* GetAnimationStorage(const uint64_t& aId) override; diff --git a/gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp b/gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp index 1887fc2333fc..47d03471be2b 100644 --- a/gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp +++ b/gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp @@ -365,34 +365,32 @@ CrossProcessCompositorBridgeParent::NotifyClearCachedResources(LayerTransactionP } bool -CrossProcessCompositorBridgeParent::SetTestSampleTime( - LayerTransactionParent* aLayerTree, const TimeStamp& aTime) +CrossProcessCompositorBridgeParent::SetTestSampleTime(const uint64_t& aId, + const TimeStamp& aTime) { - uint64_t id = aLayerTree->GetId(); - MOZ_ASSERT(id != 0); + MOZ_ASSERT(aId != 0); const CompositorBridgeParent::LayerTreeState* state = - CompositorBridgeParent::GetIndirectShadowTree(id); + CompositorBridgeParent::GetIndirectShadowTree(aId); if (!state) { return false; } MOZ_ASSERT(state->mParent); - return state->mParent->SetTestSampleTime(aLayerTree, aTime); + return state->mParent->SetTestSampleTime(aId, aTime); } void -CrossProcessCompositorBridgeParent::LeaveTestMode(LayerTransactionParent* aLayerTree) +CrossProcessCompositorBridgeParent::LeaveTestMode(const uint64_t& aId) { - uint64_t id = aLayerTree->GetId(); - MOZ_ASSERT(id != 0); + MOZ_ASSERT(aId != 0); const CompositorBridgeParent::LayerTreeState* state = - CompositorBridgeParent::GetIndirectShadowTree(id); + CompositorBridgeParent::GetIndirectShadowTree(aId); if (!state) { return; } MOZ_ASSERT(state->mParent); - state->mParent->LeaveTestMode(aLayerTree); + state->mParent->LeaveTestMode(aId); } void diff --git a/gfx/layers/ipc/CrossProcessCompositorBridgeParent.h b/gfx/layers/ipc/CrossProcessCompositorBridgeParent.h index 6da58d97e96b..fc835d26c04e 100644 --- a/gfx/layers/ipc/CrossProcessCompositorBridgeParent.h +++ b/gfx/layers/ipc/CrossProcessCompositorBridgeParent.h @@ -90,9 +90,9 @@ public: bool aHitTestUpdate) override; virtual void ForceComposite(LayerTransactionParent* aLayerTree) override; virtual void NotifyClearCachedResources(LayerTransactionParent* aLayerTree) override; - virtual bool SetTestSampleTime(LayerTransactionParent* aLayerTree, + virtual bool SetTestSampleTime(const uint64_t& aId, const TimeStamp& aTime) override; - virtual void LeaveTestMode(LayerTransactionParent* aLayerTree) override; + virtual void LeaveTestMode(const uint64_t& aId) override; virtual void ApplyAsyncProperties(LayerTransactionParent* aLayerTree) override; virtual CompositorAnimationStorage* diff --git a/gfx/layers/ipc/LayerTransactionParent.cpp b/gfx/layers/ipc/LayerTransactionParent.cpp index b6c0a9ab0dd7..49dc06c3f722 100644 --- a/gfx/layers/ipc/LayerTransactionParent.cpp +++ b/gfx/layers/ipc/LayerTransactionParent.cpp @@ -689,7 +689,7 @@ LayerTransactionParent::ShouldParentObserveEpoch() mozilla::ipc::IPCResult LayerTransactionParent::RecvSetTestSampleTime(const TimeStamp& aTime) { - if (!mCompositorBridge->SetTestSampleTime(this, aTime)) { + if (!mCompositorBridge->SetTestSampleTime(GetId(), aTime)) { return IPC_FAIL_NO_REASON(this); } return IPC_OK(); @@ -698,7 +698,7 @@ LayerTransactionParent::RecvSetTestSampleTime(const TimeStamp& aTime) mozilla::ipc::IPCResult LayerTransactionParent::RecvLeaveTestMode() { - mCompositorBridge->LeaveTestMode(this); + mCompositorBridge->LeaveTestMode(GetId()); return IPC_OK(); }