From 0ed20eff4aa53891d13b768a1b109faf34bd01f6 Mon Sep 17 00:00:00 2001 From: Jeff Muizelaar Date: Wed, 17 May 2017 10:44:33 -0400 Subject: [PATCH] Revert "Ensure our transaction arrives at the compositor before asking the parent to paint" This reverts commit e0ec2a72700f. --- dom/base/nsDOMWindowUtils.cpp | 1 - gfx/layers/Layers.h | 5 ----- gfx/layers/client/ClientLayerManager.cpp | 8 -------- gfx/layers/client/ClientLayerManager.h | 1 - gfx/layers/ipc/CompositorBridgeParent.cpp | 6 ------ gfx/layers/ipc/CompositorBridgeParent.h | 1 - gfx/layers/ipc/CrossProcessCompositorBridgeParent.h | 1 - gfx/layers/ipc/PCompositorBridge.ipdl | 3 --- gfx/layers/wr/WebRenderLayerManager.cpp | 11 +---------- gfx/layers/wr/WebRenderLayerManager.h | 1 - ipc/ipdl/sync-messages.ini | 2 -- 11 files changed, 1 insertion(+), 39 deletions(-) diff --git a/dom/base/nsDOMWindowUtils.cpp b/dom/base/nsDOMWindowUtils.cpp index 6b277fc13031..69d9f3440f2c 100644 --- a/dom/base/nsDOMWindowUtils.cpp +++ b/dom/base/nsDOMWindowUtils.cpp @@ -338,7 +338,6 @@ nsDOMWindowUtils::UpdateLayerTree() if (view) { presShell->Paint(view, view->GetBounds(), nsIPresShell::PAINT_LAYERS | nsIPresShell::PAINT_SYNC_DECODE_IMAGES); - presShell->GetLayerManager()->WaitOnTransactionProcessed(); } } return NS_OK; diff --git a/gfx/layers/Layers.h b/gfx/layers/Layers.h index 0e7811198ad1..1f3fe0dceffc 100644 --- a/gfx/layers/Layers.h +++ b/gfx/layers/Layers.h @@ -596,11 +596,6 @@ public: */ virtual void FlushRendering() { } - /** - * Make sure that the previous transaction has been - * received. This will synchronsly wait on a remote compositor. */ - virtual void WaitOnTransactionProcessed() { } - virtual void SendInvalidRegion(const nsIntRegion& aRegion) {} /** diff --git a/gfx/layers/client/ClientLayerManager.cpp b/gfx/layers/client/ClientLayerManager.cpp index 075022a32a83..8ed25c0b4465 100644 --- a/gfx/layers/client/ClientLayerManager.cpp +++ b/gfx/layers/client/ClientLayerManager.cpp @@ -656,14 +656,6 @@ ClientLayerManager::FlushRendering() } } -void -ClientLayerManager::WaitOnTransactionProcessed() -{ - CompositorBridgeChild* remoteRenderer = GetCompositorBridgeChild(); - if (remoteRenderer) { - remoteRenderer->SendWaitOnTransactionProcessed(); - } -} void ClientLayerManager::UpdateTextureFactoryIdentifier(const TextureFactoryIdentifier& aNewIdentifier, uint64_t aDeviceResetSeqNo) diff --git a/gfx/layers/client/ClientLayerManager.h b/gfx/layers/client/ClientLayerManager.h index 6dce9958810d..50a7224c0a95 100644 --- a/gfx/layers/client/ClientLayerManager.h +++ b/gfx/layers/client/ClientLayerManager.h @@ -114,7 +114,6 @@ public: } virtual void FlushRendering() override; - virtual void WaitOnTransactionProcessed() override; virtual void SendInvalidRegion(const nsIntRegion& aRegion) override; virtual uint32_t StartFrameTimeRecording(int32_t aBufferSize) override; diff --git a/gfx/layers/ipc/CompositorBridgeParent.cpp b/gfx/layers/ipc/CompositorBridgeParent.cpp index 4a337f5729d2..506c00e26d4c 100644 --- a/gfx/layers/ipc/CompositorBridgeParent.cpp +++ b/gfx/layers/ipc/CompositorBridgeParent.cpp @@ -523,12 +523,6 @@ CompositorBridgeParent::RecvMakeSnapshot(const SurfaceDescriptor& aInSnapshot, return IPC_OK(); } -mozilla::ipc::IPCResult -CompositorBridgeParent::RecvWaitOnTransactionProcessed() -{ - return IPC_OK(); -} - mozilla::ipc::IPCResult CompositorBridgeParent::RecvFlushRendering() { diff --git a/gfx/layers/ipc/CompositorBridgeParent.h b/gfx/layers/ipc/CompositorBridgeParent.h index 8bd607a72e0d..5572e1a96e25 100644 --- a/gfx/layers/ipc/CompositorBridgeParent.h +++ b/gfx/layers/ipc/CompositorBridgeParent.h @@ -199,7 +199,6 @@ public: const gfx::IntRect& aRect) override; virtual mozilla::ipc::IPCResult RecvFlushRendering() override; virtual mozilla::ipc::IPCResult RecvFlushRenderingAsync() override; - virtual mozilla::ipc::IPCResult RecvWaitOnTransactionProcessed() override; virtual mozilla::ipc::IPCResult RecvForcePresent() override; virtual mozilla::ipc::IPCResult RecvNotifyRegionInvalidated(const nsIntRegion& aRegion) override; diff --git a/gfx/layers/ipc/CrossProcessCompositorBridgeParent.h b/gfx/layers/ipc/CrossProcessCompositorBridgeParent.h index 4e9bc3508b1b..c154a7387232 100644 --- a/gfx/layers/ipc/CrossProcessCompositorBridgeParent.h +++ b/gfx/layers/ipc/CrossProcessCompositorBridgeParent.h @@ -60,7 +60,6 @@ public: virtual mozilla::ipc::IPCResult RecvFlushRendering() override { return IPC_OK(); } virtual mozilla::ipc::IPCResult RecvFlushRenderingAsync() override { return IPC_OK(); } virtual mozilla::ipc::IPCResult RecvForcePresent() override { return IPC_OK(); } - virtual mozilla::ipc::IPCResult RecvWaitOnTransactionProcessed() override { return IPC_OK(); } virtual mozilla::ipc::IPCResult RecvNotifyRegionInvalidated(const nsIntRegion& aRegion) override { return IPC_OK(); } virtual mozilla::ipc::IPCResult RecvStartFrameTimeRecording(const int32_t& aBufferSize, uint32_t* aOutStartIndex) override { return IPC_OK(); } virtual mozilla::ipc::IPCResult RecvStopFrameTimeRecording(const uint32_t& aStartIndex, InfallibleTArray* intervals) override { return IPC_OK(); } diff --git a/gfx/layers/ipc/PCompositorBridge.ipdl b/gfx/layers/ipc/PCompositorBridge.ipdl index 05e50935a239..677f0c736a58 100644 --- a/gfx/layers/ipc/PCompositorBridge.ipdl +++ b/gfx/layers/ipc/PCompositorBridge.ipdl @@ -194,9 +194,6 @@ parent: // synchronous repaints on resize. async FlushRenderingAsync(); - // Make sure any pending composites have been received. - sync WaitOnTransactionProcessed(); - // Force an additional frame presentation to be executed. This is used to // work around a windows presentation bug (See Bug 1232042) async ForcePresent(); diff --git a/gfx/layers/wr/WebRenderLayerManager.cpp b/gfx/layers/wr/WebRenderLayerManager.cpp index f4d8a87979ae..7410529c7e6d 100644 --- a/gfx/layers/wr/WebRenderLayerManager.cpp +++ b/gfx/layers/wr/WebRenderLayerManager.cpp @@ -107,7 +107,7 @@ WebRenderLayerManager::~WebRenderLayerManager() CompositorBridgeChild* WebRenderLayerManager::GetCompositorBridgeChild() { - return WrBridge()->GetCompositorBridgeChild(); + return mWidget ? mWidget->GetRemoteRenderer() : nullptr; } int32_t @@ -472,15 +472,6 @@ WebRenderLayerManager::FlushRendering() } } -void -WebRenderLayerManager::WaitOnTransactionProcessed() -{ - CompositorBridgeChild* bridge = GetCompositorBridgeChild(); - if (bridge) { - bridge->SendWaitOnTransactionProcessed(); - } -} - void WebRenderLayerManager::SendInvalidRegion(const nsIntRegion& aRegion) { diff --git a/gfx/layers/wr/WebRenderLayerManager.h b/gfx/layers/wr/WebRenderLayerManager.h index d0f0679f5eb1..2863e87d9f55 100644 --- a/gfx/layers/wr/WebRenderLayerManager.h +++ b/gfx/layers/wr/WebRenderLayerManager.h @@ -88,7 +88,6 @@ public: virtual void RemoveDidCompositeObserver(DidCompositeObserver* aObserver) override; virtual void FlushRendering() override; - virtual void WaitOnTransactionProcessed() override; virtual void SendInvalidRegion(const nsIntRegion& aRegion) override; diff --git a/ipc/ipdl/sync-messages.ini b/ipc/ipdl/sync-messages.ini index 7d67b03ba97c..62ff87aa8619 100644 --- a/ipc/ipdl/sync-messages.ini +++ b/ipc/ipdl/sync-messages.ini @@ -995,8 +995,6 @@ description = description = [PCompositorBridge::FlushRendering] description = -[PCompositorBridge::WaitOnTransactionProcessed] -description = bug 1364626 [PCompositorBridge::StartFrameTimeRecording] description = [PCompositorBridge::StopFrameTimeRecording]