Loading gfx/layers/composite/TextureHost.h +4 −0 Original line number Diff line number Diff line Loading @@ -565,6 +565,10 @@ public: virtual void WaitAcquireFenceHandleSyncComplete() {}; virtual bool NeedsFenceHandle() { return false; } virtual FenceHandle GetCompositorReleaseFence() { return FenceHandle(); } protected: FenceHandle mReleaseFenceHandle; Loading gfx/layers/ipc/CompositableTransactionParent.cpp +3 −4 Original line number Diff line number Diff line Loading @@ -133,7 +133,7 @@ CompositableParentManager::ReceiveCompositableUpdate(const CompositableOperation MOZ_ASSERT(tex.get()); compositable->RemoveTextureHost(tex); // send FenceHandle if present. SendFenceHandleIfPresent(op.textureParent(), compositable); SendFenceHandleIfPresent(op.textureParent()); break; } case CompositableOperation::TOpRemoveTextureAsync: { Loading @@ -150,8 +150,7 @@ CompositableParentManager::ReceiveCompositableUpdate(const CompositableOperation GetChildProcessId(), op.holderId(), op.transactionId(), op.textureParent(), compositable); op.textureParent()); // If the message is recievied via PLayerTransaction, // Send message back via PImageBridge. Loading @@ -161,7 +160,7 @@ CompositableParentManager::ReceiveCompositableUpdate(const CompositableOperation op.transactionId())); } else { // send FenceHandle if present. SendFenceHandleIfPresent(op.textureParent(), compositable); SendFenceHandleIfPresent(op.textureParent()); ReplyRemoveTexture(OpReplyRemoveTexture(op.holderId(), op.transactionId())); Loading gfx/layers/ipc/CompositableTransactionParent.h +1 −2 Original line number Diff line number Diff line Loading @@ -28,8 +28,7 @@ typedef std::vector<mozilla::layers::EditReply> EditReplyVector; class CompositableParentManager : public ISurfaceAllocator { public: virtual void SendFenceHandleIfPresent(PTextureParent* aTexture, CompositableHost* aCompositableHost) = 0; virtual void SendFenceHandleIfPresent(PTextureParent* aTexture) = 0; virtual void SendAsyncMessage(const InfallibleTArray<AsyncParentMessageData>& aMessage) = 0; Loading gfx/layers/ipc/ImageBridgeParent.cpp +19 −27 Original line number Diff line number Diff line Loading @@ -451,25 +451,22 @@ ImageBridgeParent::ReplyRemoveTexture(base::ProcessId aChildProcessId, } void ImageBridgeParent::SendFenceHandleIfPresent(PTextureParent* aTexture, CompositableHost* aCompositableHost) ImageBridgeParent::SendFenceHandleIfPresent(PTextureParent* aTexture) { RefPtr<TextureHost> texture = TextureHost::AsTextureHost(aTexture); if (!texture) { if (!texture || !texture->NeedsFenceHandle()) { return; } // Send a ReleaseFence of CompositorOGL. if (aCompositableHost && aCompositableHost->GetCompositor()) { FenceHandle fence = aCompositableHost->GetCompositor()->GetReleaseFence(); FenceHandle fence = texture->GetCompositorReleaseFence(); if (fence.IsValid()) { mPendingAsyncMessage.push_back(OpDeliverFence(aTexture, nullptr, fence)); } } // Send a ReleaseFence that is set by HwcComposer2D. FenceHandle fence = texture->GetAndResetReleaseFenceHandle(); // Send a ReleaseFence that is set to TextureHost by HwcComposer2D. fence = texture->GetAndResetReleaseFenceHandle(); if (fence.IsValid()) { mPendingAsyncMessage.push_back(OpDeliverFence(aTexture, nullptr, fence)); Loading @@ -479,26 +476,23 @@ ImageBridgeParent::SendFenceHandleIfPresent(PTextureParent* aTexture, void ImageBridgeParent::AppendDeliverFenceMessage(uint64_t aDestHolderId, uint64_t aTransactionId, PTextureParent* aTexture, CompositableHost* aCompositableHost) PTextureParent* aTexture) { RefPtr<TextureHost> texture = TextureHost::AsTextureHost(aTexture); if (!texture) { if (!texture || !texture->NeedsFenceHandle()) { return; } // Send a ReleaseFence of CompositorOGL. if (aCompositableHost && aCompositableHost->GetCompositor()) { FenceHandle fence = aCompositableHost->GetCompositor()->GetReleaseFence(); FenceHandle fence = texture->GetCompositorReleaseFence(); if (fence.IsValid()) { mPendingAsyncMessage.push_back(OpDeliverFenceToTracker(aDestHolderId, aTransactionId, fence)); } } // Send a ReleaseFence that is set by HwcComposer2D. FenceHandle fence = texture->GetAndResetReleaseFenceHandle(); // Send a ReleaseFence that is set to TextureHost by HwcComposer2D. fence = texture->GetAndResetReleaseFenceHandle(); if (fence.IsValid()) { mPendingAsyncMessage.push_back(OpDeliverFenceToTracker(aDestHolderId, aTransactionId, Loading @@ -510,8 +504,7 @@ ImageBridgeParent::AppendDeliverFenceMessage(uint64_t aDestHolderId, ImageBridgeParent::AppendDeliverFenceMessage(base::ProcessId aChildProcessId, uint64_t aDestHolderId, uint64_t aTransactionId, PTextureParent* aTexture, CompositableHost* aCompositableHost) PTextureParent* aTexture) { ImageBridgeParent* imageBridge = ImageBridgeParent::GetInstance(aChildProcessId); if (!imageBridge) { Loading @@ -519,8 +512,7 @@ ImageBridgeParent::AppendDeliverFenceMessage(base::ProcessId aChildProcessId, } imageBridge->AppendDeliverFenceMessage(aDestHolderId, aTransactionId, aTexture, aCompositableHost); aTexture); } /*static*/ void Loading gfx/layers/ipc/ImageBridgeParent.h +3 −6 Original line number Diff line number Diff line Loading @@ -56,8 +56,7 @@ public: Create(Transport* aTransport, ProcessId aChildProcessId); // CompositableParentManager virtual void SendFenceHandleIfPresent(PTextureParent* aTexture, CompositableHost* aCompositableHost) override; virtual void SendFenceHandleIfPresent(PTextureParent* aTexture) override; virtual void SendAsyncMessage(const InfallibleTArray<AsyncParentMessageData>& aMessage) override; Loading Loading @@ -121,14 +120,12 @@ public: void AppendDeliverFenceMessage(uint64_t aDestHolderId, uint64_t aTransactionId, PTextureParent* aTexture, CompositableHost* aCompositableHost); PTextureParent* aTexture); static void AppendDeliverFenceMessage(base::ProcessId aChildProcessId, uint64_t aDestHolderId, uint64_t aTransactionId, PTextureParent* aTexture, CompositableHost* aCompositableHost); PTextureParent* aTexture); using CompositableParentManager::SendPendingAsyncMessages; static void SendPendingAsyncMessages(base::ProcessId aChildProcessId); Loading Loading
gfx/layers/composite/TextureHost.h +4 −0 Original line number Diff line number Diff line Loading @@ -565,6 +565,10 @@ public: virtual void WaitAcquireFenceHandleSyncComplete() {}; virtual bool NeedsFenceHandle() { return false; } virtual FenceHandle GetCompositorReleaseFence() { return FenceHandle(); } protected: FenceHandle mReleaseFenceHandle; Loading
gfx/layers/ipc/CompositableTransactionParent.cpp +3 −4 Original line number Diff line number Diff line Loading @@ -133,7 +133,7 @@ CompositableParentManager::ReceiveCompositableUpdate(const CompositableOperation MOZ_ASSERT(tex.get()); compositable->RemoveTextureHost(tex); // send FenceHandle if present. SendFenceHandleIfPresent(op.textureParent(), compositable); SendFenceHandleIfPresent(op.textureParent()); break; } case CompositableOperation::TOpRemoveTextureAsync: { Loading @@ -150,8 +150,7 @@ CompositableParentManager::ReceiveCompositableUpdate(const CompositableOperation GetChildProcessId(), op.holderId(), op.transactionId(), op.textureParent(), compositable); op.textureParent()); // If the message is recievied via PLayerTransaction, // Send message back via PImageBridge. Loading @@ -161,7 +160,7 @@ CompositableParentManager::ReceiveCompositableUpdate(const CompositableOperation op.transactionId())); } else { // send FenceHandle if present. SendFenceHandleIfPresent(op.textureParent(), compositable); SendFenceHandleIfPresent(op.textureParent()); ReplyRemoveTexture(OpReplyRemoveTexture(op.holderId(), op.transactionId())); Loading
gfx/layers/ipc/CompositableTransactionParent.h +1 −2 Original line number Diff line number Diff line Loading @@ -28,8 +28,7 @@ typedef std::vector<mozilla::layers::EditReply> EditReplyVector; class CompositableParentManager : public ISurfaceAllocator { public: virtual void SendFenceHandleIfPresent(PTextureParent* aTexture, CompositableHost* aCompositableHost) = 0; virtual void SendFenceHandleIfPresent(PTextureParent* aTexture) = 0; virtual void SendAsyncMessage(const InfallibleTArray<AsyncParentMessageData>& aMessage) = 0; Loading
gfx/layers/ipc/ImageBridgeParent.cpp +19 −27 Original line number Diff line number Diff line Loading @@ -451,25 +451,22 @@ ImageBridgeParent::ReplyRemoveTexture(base::ProcessId aChildProcessId, } void ImageBridgeParent::SendFenceHandleIfPresent(PTextureParent* aTexture, CompositableHost* aCompositableHost) ImageBridgeParent::SendFenceHandleIfPresent(PTextureParent* aTexture) { RefPtr<TextureHost> texture = TextureHost::AsTextureHost(aTexture); if (!texture) { if (!texture || !texture->NeedsFenceHandle()) { return; } // Send a ReleaseFence of CompositorOGL. if (aCompositableHost && aCompositableHost->GetCompositor()) { FenceHandle fence = aCompositableHost->GetCompositor()->GetReleaseFence(); FenceHandle fence = texture->GetCompositorReleaseFence(); if (fence.IsValid()) { mPendingAsyncMessage.push_back(OpDeliverFence(aTexture, nullptr, fence)); } } // Send a ReleaseFence that is set by HwcComposer2D. FenceHandle fence = texture->GetAndResetReleaseFenceHandle(); // Send a ReleaseFence that is set to TextureHost by HwcComposer2D. fence = texture->GetAndResetReleaseFenceHandle(); if (fence.IsValid()) { mPendingAsyncMessage.push_back(OpDeliverFence(aTexture, nullptr, fence)); Loading @@ -479,26 +476,23 @@ ImageBridgeParent::SendFenceHandleIfPresent(PTextureParent* aTexture, void ImageBridgeParent::AppendDeliverFenceMessage(uint64_t aDestHolderId, uint64_t aTransactionId, PTextureParent* aTexture, CompositableHost* aCompositableHost) PTextureParent* aTexture) { RefPtr<TextureHost> texture = TextureHost::AsTextureHost(aTexture); if (!texture) { if (!texture || !texture->NeedsFenceHandle()) { return; } // Send a ReleaseFence of CompositorOGL. if (aCompositableHost && aCompositableHost->GetCompositor()) { FenceHandle fence = aCompositableHost->GetCompositor()->GetReleaseFence(); FenceHandle fence = texture->GetCompositorReleaseFence(); if (fence.IsValid()) { mPendingAsyncMessage.push_back(OpDeliverFenceToTracker(aDestHolderId, aTransactionId, fence)); } } // Send a ReleaseFence that is set by HwcComposer2D. FenceHandle fence = texture->GetAndResetReleaseFenceHandle(); // Send a ReleaseFence that is set to TextureHost by HwcComposer2D. fence = texture->GetAndResetReleaseFenceHandle(); if (fence.IsValid()) { mPendingAsyncMessage.push_back(OpDeliverFenceToTracker(aDestHolderId, aTransactionId, Loading @@ -510,8 +504,7 @@ ImageBridgeParent::AppendDeliverFenceMessage(uint64_t aDestHolderId, ImageBridgeParent::AppendDeliverFenceMessage(base::ProcessId aChildProcessId, uint64_t aDestHolderId, uint64_t aTransactionId, PTextureParent* aTexture, CompositableHost* aCompositableHost) PTextureParent* aTexture) { ImageBridgeParent* imageBridge = ImageBridgeParent::GetInstance(aChildProcessId); if (!imageBridge) { Loading @@ -519,8 +512,7 @@ ImageBridgeParent::AppendDeliverFenceMessage(base::ProcessId aChildProcessId, } imageBridge->AppendDeliverFenceMessage(aDestHolderId, aTransactionId, aTexture, aCompositableHost); aTexture); } /*static*/ void Loading
gfx/layers/ipc/ImageBridgeParent.h +3 −6 Original line number Diff line number Diff line Loading @@ -56,8 +56,7 @@ public: Create(Transport* aTransport, ProcessId aChildProcessId); // CompositableParentManager virtual void SendFenceHandleIfPresent(PTextureParent* aTexture, CompositableHost* aCompositableHost) override; virtual void SendFenceHandleIfPresent(PTextureParent* aTexture) override; virtual void SendAsyncMessage(const InfallibleTArray<AsyncParentMessageData>& aMessage) override; Loading Loading @@ -121,14 +120,12 @@ public: void AppendDeliverFenceMessage(uint64_t aDestHolderId, uint64_t aTransactionId, PTextureParent* aTexture, CompositableHost* aCompositableHost); PTextureParent* aTexture); static void AppendDeliverFenceMessage(base::ProcessId aChildProcessId, uint64_t aDestHolderId, uint64_t aTransactionId, PTextureParent* aTexture, CompositableHost* aCompositableHost); PTextureParent* aTexture); using CompositableParentManager::SendPendingAsyncMessages; static void SendPendingAsyncMessages(base::ProcessId aChildProcessId); Loading