Remove ISurfaceAllocator::GetCompositorBackend. (bug 1211109 part 4, r=mattwoodrow)

This commit is contained in:
David Anderson 2015-10-05 23:40:13 -07:00
parent 8b664ce8c1
commit 965d3fed95
13 changed files with 12 additions and 30 deletions

View File

@ -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)

View File

@ -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)

View File

@ -358,7 +358,7 @@ BackendTypeForBackendSelector(LayersBackend aLayersBackend, BackendSelector aSel
// static
already_AddRefed<TextureClient>
TextureClient::CreateForDrawing(ISurfaceAllocator* aAllocator,
TextureClient::CreateForDrawing(CompositableForwarder* aAllocator,
gfx::SurfaceFormat aFormat,
gfx::IntSize aSize,
BackendSelector aSelector,

View File

@ -178,7 +178,7 @@ public:
// Creates and allocates a TextureClient usable with Moz2D.
static already_AddRefed<TextureClient>
CreateForDrawing(ISurfaceAllocator* aAllocator,
CreateForDrawing(CompositableForwarder* aAllocator,
gfx::SurfaceFormat aFormat,
gfx::IntSize aSize,
BackendSelector aSelector,

View File

@ -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)

View File

@ -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<RefPtr<TextureClient> > mTextureClients;
std::stack<RefPtr<TextureClient> > mTextureClientsDeferred;
nsRefPtr<nsITimer> mTimer;
RefPtr<ISurfaceAllocator> mSurfaceAllocator;
RefPtr<CompositableForwarder> mSurfaceAllocator;
};
} // namespace layers

View File

@ -31,7 +31,7 @@ protected:
RefPtr<TextureClient> mTextureClient;
};
TextureClientRecycleAllocator::TextureClientRecycleAllocator(ISurfaceAllocator *aAllocator)
TextureClientRecycleAllocator::TextureClientRecycleAllocator(CompositableForwarder* aAllocator)
: mSurfaceAllocator(aAllocator)
, mMaxPooledSize(kMaxPooledSized)
, mLock("TextureClientRecycleAllocatorImp.mLock")

View File

@ -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<ISurfaceAllocator> mSurfaceAllocator;
RefPtr<CompositableForwarder> mSurfaceAllocator;
private:
friend class TextureClient;

View File

@ -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;
}

View File

@ -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

View File

@ -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*

View File

@ -182,12 +182,6 @@ LayerTransactionParent::Destroy()
}
}
LayersBackend
LayerTransactionParent::GetCompositorBackendType() const
{
return mLayerManager->GetBackendType();
}
bool
LayerTransactionParent::RecvUpdateNoSwap(InfallibleTArray<Edit>&& cset,
const uint64_t& aTransactionId,

View File

@ -78,8 +78,6 @@ public:
PLayerTransactionParent::DeallocShmem(aShmem);
}
virtual LayersBackend GetCompositorBackendType() const override;
virtual bool IsSameProcess() const override;
const uint64_t& GetPendingTransactionId() { return mPendingTransaction; }