diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:37 +0000 |
commit | a90a5cba08fdf6c0ceb95101c275108a152a3aed (patch) | |
tree | 532507288f3defd7f4dcf1af49698bcb76034855 /gfx/layers/ipc/CompositorBridgeParent.cpp | |
parent | Adding debian version 126.0.1-1. (diff) | |
download | firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gfx/layers/ipc/CompositorBridgeParent.cpp')
-rw-r--r-- | gfx/layers/ipc/CompositorBridgeParent.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gfx/layers/ipc/CompositorBridgeParent.cpp b/gfx/layers/ipc/CompositorBridgeParent.cpp index 767ea47b2f..d6efb2c991 100644 --- a/gfx/layers/ipc/CompositorBridgeParent.cpp +++ b/gfx/layers/ipc/CompositorBridgeParent.cpp @@ -167,6 +167,7 @@ bool CompositorBridgeParentBase::DeallocShmem(ipc::Shmem& aShmem) { CompositorBridgeParent::LayerTreeState::LayerTreeState() : mApzcTreeManagerParent(nullptr), + mApzInputBridgeParent(nullptr), mParent(nullptr), mContentCompositorBridgeParent(nullptr) {} @@ -645,9 +646,21 @@ bool CompositorBridgeParent::DeallocPAPZCTreeManagerParent( return true; } +void CompositorBridgeParent::SetAPZInputBridgeParent( + const LayersId& aLayersId, APZInputBridgeParent* aInputBridgeParent) { + MOZ_RELEASE_ASSERT(XRE_IsGPUProcess()); + MOZ_ASSERT(NS_IsMainThread()); + StaticMonitorAutoLock lock(CompositorBridgeParent::sIndirectLayerTreesLock); + CompositorBridgeParent::LayerTreeState& state = + CompositorBridgeParent::sIndirectLayerTrees[aLayersId]; + MOZ_ASSERT(!state.mApzInputBridgeParent); + state.mApzInputBridgeParent = aInputBridgeParent; +} + void CompositorBridgeParent::AllocateAPZCTreeManagerParent( const StaticMonitorAutoLock& aProofOfLayerTreeStateLock, const LayersId& aLayersId, LayerTreeState& aState) { + MOZ_ASSERT(CompositorThreadHolder::IsInCompositorThread()); MOZ_ASSERT(aState.mParent == this); MOZ_ASSERT(mApzcTreeManager); MOZ_ASSERT(mApzUpdater); @@ -1713,6 +1726,15 @@ APZCTreeManagerParent* CompositorBridgeParent::GetApzcTreeManagerParentForRoot( } /* static */ +APZInputBridgeParent* CompositorBridgeParent::GetApzInputBridgeParentForRoot( + LayersId aContentLayersId) { + StaticMonitorAutoLock lock(sIndirectLayerTreesLock); + CompositorBridgeParent::LayerTreeState* state = + GetStateForRoot(aContentLayersId, lock); + return state ? state->mApzInputBridgeParent : nullptr; +} + +/* static */ GeckoContentController* CompositorBridgeParent::GetGeckoContentControllerForRoot( LayersId aContentLayersId) { |