Bug 897452 - Part 11 - remove TextureClient::OnActorDestroy - r=nrc

This commit is contained in:
Benoit Jacob 2013-12-11 20:45:03 -05:00
Родитель 94263041e6
Коммит ddd558c190
6 изменённых файлов: 0 добавлений и 81 удалений

Просмотреть файл

@ -109,9 +109,6 @@ CanvasClient2D::CreateBufferTextureClient(gfx::SurfaceFormat aFormat, TextureFla
void void
CanvasClient2D::OnActorDestroy() CanvasClient2D::OnActorDestroy()
{ {
if (mBuffer) {
mBuffer->OnActorDestroy();
}
} }
void void
@ -168,9 +165,6 @@ DeprecatedCanvasClient2D::Update(gfx::IntSize aSize, ClientCanvasLayer* aLayer)
void void
DeprecatedCanvasClient2D::OnActorDestroy() DeprecatedCanvasClient2D::OnActorDestroy()
{ {
if (mDeprecatedTextureClient) {
mDeprecatedTextureClient->OnActorDestroy();
}
} }
void void
@ -244,9 +238,6 @@ DeprecatedCanvasClientSurfaceStream::Update(gfx::IntSize aSize, ClientCanvasLaye
void void
DeprecatedCanvasClientSurfaceStream::OnActorDestroy() DeprecatedCanvasClientSurfaceStream::OnActorDestroy()
{ {
if (mDeprecatedTextureClient) {
mDeprecatedTextureClient->OnActorDestroy();
}
} }
} }

Просмотреть файл

@ -298,12 +298,6 @@ ContentClientRemoteBuffer::SwapBuffers(const nsIntRegion& aFrontUpdatedRegion)
void void
ContentClientRemoteBuffer::OnActorDestroy() ContentClientRemoteBuffer::OnActorDestroy()
{ {
if (mTextureClient) {
mTextureClient->OnActorDestroy();
}
if (mTextureClientOnWhite) {
mTextureClientOnWhite->OnActorDestroy();
}
} }
void void
@ -495,12 +489,6 @@ DeprecatedContentClientRemoteBuffer::SwapBuffers(const nsIntRegion& aFrontUpdate
void void
DeprecatedContentClientRemoteBuffer::OnActorDestroy() DeprecatedContentClientRemoteBuffer::OnActorDestroy()
{ {
if (mDeprecatedTextureClient) {
mDeprecatedTextureClient->OnActorDestroy();
}
if (mDeprecatedTextureClientOnWhite) {
mDeprecatedTextureClientOnWhite->OnActorDestroy();
}
} }
void void
@ -660,18 +648,6 @@ ContentClientDoubleBuffered::UpdateDestinationFrom(const RotatedBuffer& aSource,
void void
ContentClientDoubleBuffered::OnActorDestroy() ContentClientDoubleBuffered::OnActorDestroy()
{ {
if (mTextureClient) {
mTextureClient->OnActorDestroy();
}
if (mTextureClientOnWhite) {
mTextureClientOnWhite->OnActorDestroy();
}
if (mFrontClient) {
mFrontClient->OnActorDestroy();
}
if (mFrontClientOnWhite) {
mFrontClientOnWhite->OnActorDestroy();
}
} }
DeprecatedContentClientDoubleBuffered::~DeprecatedContentClientDoubleBuffered() DeprecatedContentClientDoubleBuffered::~DeprecatedContentClientDoubleBuffered()
@ -777,18 +753,6 @@ DeprecatedContentClientDoubleBuffered::SwapBuffers(const nsIntRegion& aFrontUpda
void void
DeprecatedContentClientDoubleBuffered::OnActorDestroy() DeprecatedContentClientDoubleBuffered::OnActorDestroy()
{ {
if (mDeprecatedTextureClient) {
mDeprecatedTextureClient->OnActorDestroy();
}
if (mDeprecatedTextureClientOnWhite) {
mDeprecatedTextureClientOnWhite->OnActorDestroy();
}
if (mFrontClient) {
mFrontClient->OnActorDestroy();
}
if (mFrontClientOnWhite) {
mFrontClientOnWhite->OnActorDestroy();
}
} }
struct AutoDeprecatedTextureClient { struct AutoDeprecatedTextureClient {

Просмотреть файл

@ -283,20 +283,11 @@ ImageClientBuffered::UpdateImage(ImageContainer* aContainer,
void void
ImageClientSingle::OnActorDestroy() ImageClientSingle::OnActorDestroy()
{ {
if (mFrontBuffer) {
mFrontBuffer->OnActorDestroy();
}
} }
void void
ImageClientBuffered::OnActorDestroy() ImageClientBuffered::OnActorDestroy()
{ {
if (mFrontBuffer) {
mFrontBuffer->OnActorDestroy();
}
if (mBackBuffer) {
mBackBuffer->OnActorDestroy();
}
} }
bool bool
@ -487,9 +478,6 @@ ImageClientBridge::ImageClientBridge(CompositableForwarder* aFwd,
void void
DeprecatedImageClientSingle::OnActorDestroy() DeprecatedImageClientSingle::OnActorDestroy()
{ {
if (mDeprecatedTextureClient) {
mDeprecatedTextureClient->OnActorDestroy();
}
} }
bool bool

Просмотреть файл

@ -565,15 +565,6 @@ DeprecatedTextureClient::~DeprecatedTextureClient()
MOZ_ASSERT(mDescriptor.type() == SurfaceDescriptor::T__None, "Need to release surface!"); MOZ_ASSERT(mDescriptor.type() == SurfaceDescriptor::T__None, "Need to release surface!");
} }
void
DeprecatedTextureClient::OnActorDestroy()
{
if (ISurfaceAllocator::IsShmem(&mDescriptor)) {
mDescriptor = SurfaceDescriptor();
}
}
DeprecatedTextureClientShmem::DeprecatedTextureClientShmem(CompositableForwarder* aForwarder, DeprecatedTextureClientShmem::DeprecatedTextureClientShmem(CompositableForwarder* aForwarder,
const TextureInfo& aTextureInfo) const TextureInfo& aTextureInfo)
: DeprecatedTextureClient(aForwarder, aTextureInfo) : DeprecatedTextureClient(aForwarder, aTextureInfo)

Просмотреть файл

@ -253,10 +253,6 @@ public:
*/ */
void MarkInvalid() { mValid = false; } void MarkInvalid() { mValid = false; }
// If a texture client holds a reference to shmem, it should override this
// method to forget about the shmem _without_ releasing it.
virtual void OnActorDestroy() {}
/** /**
* Create and init the TextureChild/Parent IPDL actor pair. * Create and init the TextureChild/Parent IPDL actor pair.
* *
@ -398,11 +394,6 @@ public:
ipc::Shmem& GetShmem() { return mShmem; } ipc::Shmem& GetShmem() { return mShmem; }
virtual void OnActorDestroy() MOZ_OVERRIDE
{
mShmem = ipc::Shmem();
}
protected: protected:
ipc::Shmem mShmem; ipc::Shmem mShmem;
RefPtr<ISurfaceAllocator> mAllocator; RefPtr<ISurfaceAllocator> mAllocator;
@ -579,8 +570,6 @@ public:
virtual gfxContentType GetContentType() = 0; virtual gfxContentType GetContentType() = 0;
void OnActorDestroy();
protected: protected:
DeprecatedTextureClient(CompositableForwarder* aForwarder, DeprecatedTextureClient(CompositableForwarder* aForwarder,
const TextureInfo& aTextureInfo); const TextureInfo& aTextureInfo);

Просмотреть файл

@ -254,10 +254,6 @@ public:
void OnActorDestroy() void OnActorDestroy()
{ {
for (size_t i = 0; i < mRetainedTiles.Length(); i++) {
if (mRetainedTiles[i].IsPlaceholderTile()) continue;
mRetainedTiles[i].mDeprecatedTextureClient->OnActorDestroy();
}
} }
protected: protected: