diff --git a/gfx/layers/D3D11ShareHandleImage.h b/gfx/layers/D3D11ShareHandleImage.h index 4bd3075b6d6..93836705c23 100644 --- a/gfx/layers/D3D11ShareHandleImage.h +++ b/gfx/layers/D3D11ShareHandleImage.h @@ -20,7 +20,7 @@ namespace layers { class D3D11RecycleAllocator : public TextureClientRecycleAllocator { public: - explicit D3D11RecycleAllocator(ISurfaceAllocator* aAllocator, + explicit D3D11RecycleAllocator(CompositableForwarder* aAllocator, ID3D11Device* aDevice) : TextureClientRecycleAllocator(aAllocator) , mDevice(aDevice) diff --git a/gfx/layers/D3D9SurfaceImage.h b/gfx/layers/D3D9SurfaceImage.h index 032a23dce62..a4c68288a55 100644 --- a/gfx/layers/D3D9SurfaceImage.h +++ b/gfx/layers/D3D9SurfaceImage.h @@ -20,7 +20,7 @@ class SharedTextureClientD3D9; class D3D9RecycleAllocator : public TextureClientRecycleAllocator { public: - explicit D3D9RecycleAllocator(ISurfaceAllocator* aAllocator, + explicit D3D9RecycleAllocator(CompositableForwarder* aAllocator, IDirect3DDevice9* aDevice) : TextureClientRecycleAllocator(aAllocator) , mDevice(aDevice) diff --git a/gfx/layers/client/TextureClient.cpp b/gfx/layers/client/TextureClient.cpp index 327bbe56a8b..fe6e4a98178 100644 --- a/gfx/layers/client/TextureClient.cpp +++ b/gfx/layers/client/TextureClient.cpp @@ -358,7 +358,7 @@ BackendTypeForBackendSelector(LayersBackend aLayersBackend, BackendSelector aSel // static already_AddRefed -TextureClient::CreateForDrawing(ISurfaceAllocator* aAllocator, +TextureClient::CreateForDrawing(CompositableForwarder* aAllocator, gfx::SurfaceFormat aFormat, gfx::IntSize aSize, BackendSelector aSelector, diff --git a/gfx/layers/client/TextureClient.h b/gfx/layers/client/TextureClient.h index 724cd5e12fd..72f11165017 100644 --- a/gfx/layers/client/TextureClient.h +++ b/gfx/layers/client/TextureClient.h @@ -178,7 +178,7 @@ public: // Creates and allocates a TextureClient usable with Moz2D. static already_AddRefed - CreateForDrawing(ISurfaceAllocator* aAllocator, + CreateForDrawing(CompositableForwarder* aAllocator, gfx::SurfaceFormat aFormat, gfx::IntSize aSize, BackendSelector aSelector, diff --git a/gfx/layers/client/TextureClientPool.cpp b/gfx/layers/client/TextureClientPool.cpp index 2ebda051551..2a38f5a6a90 100644 --- a/gfx/layers/client/TextureClientPool.cpp +++ b/gfx/layers/client/TextureClientPool.cpp @@ -27,7 +27,7 @@ TextureClientPool::TextureClientPool(gfx::SurfaceFormat aFormat, gfx::IntSize aSize, uint32_t aMaxTextureClients, uint32_t aShrinkTimeoutMsec, - ISurfaceAllocator *aAllocator) + CompositableForwarder* aAllocator) : mFormat(aFormat) , mSize(aSize) , mMaxTextureClients(aMaxTextureClients) diff --git a/gfx/layers/client/TextureClientPool.h b/gfx/layers/client/TextureClientPool.h index 27b6cdb581b..e4ec86632a8 100644 --- a/gfx/layers/client/TextureClientPool.h +++ b/gfx/layers/client/TextureClientPool.h @@ -17,6 +17,7 @@ namespace mozilla { namespace layers { class ISurfaceAllocator; +class CompositableForwarder; class TextureClientAllocator { @@ -44,7 +45,7 @@ public: TextureClientPool(gfx::SurfaceFormat aFormat, gfx::IntSize aSize, uint32_t aMaxTextureClients, uint32_t aShrinkTimeoutMsec, - ISurfaceAllocator *aAllocator); + CompositableForwarder* aAllocator); /** * Gets an allocated TextureClient of size and format that are determined @@ -131,7 +132,7 @@ private: std::stack > mTextureClients; std::stack > mTextureClientsDeferred; nsRefPtr mTimer; - RefPtr mSurfaceAllocator; + RefPtr mSurfaceAllocator; }; } // namespace layers diff --git a/gfx/layers/client/TextureClientRecycleAllocator.cpp b/gfx/layers/client/TextureClientRecycleAllocator.cpp index dec12bce34f..d88b82ac3c8 100644 --- a/gfx/layers/client/TextureClientRecycleAllocator.cpp +++ b/gfx/layers/client/TextureClientRecycleAllocator.cpp @@ -31,7 +31,7 @@ protected: RefPtr mTextureClient; }; -TextureClientRecycleAllocator::TextureClientRecycleAllocator(ISurfaceAllocator *aAllocator) +TextureClientRecycleAllocator::TextureClientRecycleAllocator(CompositableForwarder* aAllocator) : mSurfaceAllocator(aAllocator) , mMaxPooledSize(kMaxPooledSized) , mLock("TextureClientRecycleAllocatorImp.mLock") diff --git a/gfx/layers/client/TextureClientRecycleAllocator.h b/gfx/layers/client/TextureClientRecycleAllocator.h index 919743851eb..4fd35851dee 100644 --- a/gfx/layers/client/TextureClientRecycleAllocator.h +++ b/gfx/layers/client/TextureClientRecycleAllocator.h @@ -37,7 +37,7 @@ protected: public: NS_INLINE_DECL_THREADSAFE_REFCOUNTING(TextureClientRecycleAllocator) - explicit TextureClientRecycleAllocator(ISurfaceAllocator* aAllocator); + explicit TextureClientRecycleAllocator(CompositableForwarder* aAllocator); void SetMaxPoolSize(uint32_t aMax); @@ -57,7 +57,7 @@ protected: TextureFlags aTextureFlags, TextureAllocationFlags aAllocFlags); - RefPtr mSurfaceAllocator; + RefPtr mSurfaceAllocator; private: friend class TextureClient; diff --git a/gfx/layers/ipc/CompositableForwarder.h b/gfx/layers/ipc/CompositableForwarder.h index e3e37a86c42..d015bbb216f 100644 --- a/gfx/layers/ipc/CompositableForwarder.h +++ b/gfx/layers/ipc/CompositableForwarder.h @@ -169,7 +169,7 @@ public: * We only don't allow changing the backend type at runtime so this value can * be queried once and will not change until Gecko is restarted. */ - LayersBackend GetCompositorBackendType() const override + LayersBackend GetCompositorBackendType() const { return mTextureFactoryIdentifier.mParentBackend; } diff --git a/gfx/layers/ipc/ISurfaceAllocator.h b/gfx/layers/ipc/ISurfaceAllocator.h index 29816232995..b76f7df8053 100644 --- a/gfx/layers/ipc/ISurfaceAllocator.h +++ b/gfx/layers/ipc/ISurfaceAllocator.h @@ -83,12 +83,6 @@ public: void Finalize(); - /** - * Returns the preferred compositor backend type for drawing. If not known - * or not supported, LAYERS_NONE is returned. - */ - virtual LayersBackend GetCompositorBackendType() const = 0; - /** * Allocate shared memory that can be accessed by only one process at a time. * Ownership of this memory is passed when the memory is sent in an IPDL diff --git a/gfx/layers/ipc/ImageBridgeParent.h b/gfx/layers/ipc/ImageBridgeParent.h index d509c970fad..ea5143f41d6 100644 --- a/gfx/layers/ipc/ImageBridgeParent.h +++ b/gfx/layers/ipc/ImageBridgeParent.h @@ -49,11 +49,6 @@ public: ImageBridgeParent(MessageLoop* aLoop, Transport* aTransport, ProcessId aChildProcessId); ~ImageBridgeParent(); - LayersBackend GetCompositorBackendType() const override { - MOZ_CRASH("ImageBridgeParent does not support GetCompositorBackendType"); - return LayersBackend::LAYERS_NONE; - } - virtual void ActorDestroy(ActorDestroyReason aWhy) override; static PImageBridgeParent* diff --git a/gfx/layers/ipc/LayerTransactionParent.cpp b/gfx/layers/ipc/LayerTransactionParent.cpp index 7e04c167b56..7f30eeef5cf 100644 --- a/gfx/layers/ipc/LayerTransactionParent.cpp +++ b/gfx/layers/ipc/LayerTransactionParent.cpp @@ -182,12 +182,6 @@ LayerTransactionParent::Destroy() } } -LayersBackend -LayerTransactionParent::GetCompositorBackendType() const -{ - return mLayerManager->GetBackendType(); -} - bool LayerTransactionParent::RecvUpdateNoSwap(InfallibleTArray&& cset, const uint64_t& aTransactionId, diff --git a/gfx/layers/ipc/LayerTransactionParent.h b/gfx/layers/ipc/LayerTransactionParent.h index 7d5d8aee755..7a10c51046b 100644 --- a/gfx/layers/ipc/LayerTransactionParent.h +++ b/gfx/layers/ipc/LayerTransactionParent.h @@ -78,8 +78,6 @@ public: PLayerTransactionParent::DeallocShmem(aShmem); } - virtual LayersBackend GetCompositorBackendType() const override; - virtual bool IsSameProcess() const override; const uint64_t& GetPendingTransactionId() { return mPendingTransaction; }