mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 08d9bbb1044f (bug 907463)
This commit is contained in:
parent
19a4b3f0e2
commit
66291f30cc
@ -104,14 +104,6 @@ CanvasClient2D::CreateBufferTextureClient(gfx::SurfaceFormat aFormat)
|
||||
mTextureInfo.mTextureFlags);
|
||||
}
|
||||
|
||||
void
|
||||
CanvasClient2D::OnActorDestroy()
|
||||
{
|
||||
if (mBuffer) {
|
||||
mBuffer->OnActorDestroy();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
DeprecatedCanvasClient2D::Updated()
|
||||
{
|
||||
@ -163,14 +155,6 @@ DeprecatedCanvasClient2D::Update(gfx::IntSize aSize, ClientCanvasLayer* aLayer)
|
||||
mDeprecatedTextureClient->Unlock();
|
||||
}
|
||||
|
||||
void
|
||||
DeprecatedCanvasClient2D::OnActorDestroy()
|
||||
{
|
||||
if (mDeprecatedTextureClient) {
|
||||
mDeprecatedTextureClient->OnActorDestroy();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
DeprecatedCanvasClientSurfaceStream::Updated()
|
||||
{
|
||||
@ -239,13 +223,5 @@ DeprecatedCanvasClientSurfaceStream::Update(gfx::IntSize aSize, ClientCanvasLaye
|
||||
aLayer->Painted();
|
||||
}
|
||||
|
||||
void
|
||||
DeprecatedCanvasClientSurfaceStream::OnActorDestroy()
|
||||
{
|
||||
if (mDeprecatedTextureClient) {
|
||||
mDeprecatedTextureClient->OnActorDestroy();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -90,12 +90,9 @@ public:
|
||||
mBuffer = nullptr;
|
||||
}
|
||||
|
||||
virtual void OnActorDestroy() MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
RefPtr<TextureClient> mBuffer;
|
||||
};
|
||||
|
||||
class DeprecatedCanvasClient2D : public CanvasClient
|
||||
{
|
||||
public:
|
||||
@ -116,8 +113,6 @@ public:
|
||||
mDeprecatedTextureClient->SetDescriptorFromReply(aDescriptor);
|
||||
}
|
||||
|
||||
virtual void OnActorDestroy() MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
RefPtr<DeprecatedTextureClient> mDeprecatedTextureClient;
|
||||
};
|
||||
@ -144,8 +139,6 @@ public:
|
||||
mDeprecatedTextureClient->SetDescriptorFromReply(aDescriptor);
|
||||
}
|
||||
|
||||
virtual void OnActorDestroy() MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
RefPtr<DeprecatedTextureClient> mDeprecatedTextureClient;
|
||||
};
|
||||
|
@ -35,6 +35,7 @@ CompositableClient::~CompositableClient()
|
||||
Destroy();
|
||||
|
||||
FlushTexturesToRemoveCallbacks();
|
||||
|
||||
MOZ_ASSERT(mTexturesToRemove.Length() == 0, "would leak textures pending for deletion");
|
||||
}
|
||||
|
||||
@ -86,7 +87,6 @@ CompositableClient::Destroy()
|
||||
if (!mCompositableChild) {
|
||||
return;
|
||||
}
|
||||
mCompositableChild->SetClient(nullptr);
|
||||
mCompositableChild->Destroy();
|
||||
mCompositableChild = nullptr;
|
||||
}
|
||||
@ -263,13 +263,5 @@ CompositableClient::OnTransaction()
|
||||
mTexturesToRemove.Clear();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
CompositableChild::ActorDestroy(ActorDestroyReason why)
|
||||
{
|
||||
if (mCompositableClient) {
|
||||
mCompositableClient->OnActorDestroy();
|
||||
}
|
||||
}
|
||||
} // namespace layers
|
||||
} // namespace mozilla
|
||||
|
@ -144,12 +144,6 @@ public:
|
||||
void OnReplyTextureRemoved(uint64_t aTextureID);
|
||||
|
||||
void FlushTexturesToRemoveCallbacks();
|
||||
|
||||
/**
|
||||
* Our IPDL actor is being destroyed, get rid of any shmem resources now.
|
||||
*/
|
||||
virtual void OnActorDestroy() = 0;
|
||||
|
||||
protected:
|
||||
struct TextureIDAndFlags {
|
||||
TextureIDAndFlags(uint64_t aID, TextureFlags aFlags)
|
||||
@ -196,8 +190,6 @@ public:
|
||||
return mCompositableClient;
|
||||
}
|
||||
|
||||
virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
|
||||
|
||||
void SetAsyncID(uint64_t aID) { mID = aID; }
|
||||
uint64_t GetAsyncID() const
|
||||
{
|
||||
|
@ -326,21 +326,6 @@ ContentClientRemoteBuffer::SwapBuffers(const nsIntRegion& aFrontUpdatedRegion)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ContentClientRemoteBuffer::OnActorDestroy()
|
||||
{
|
||||
if (mDeprecatedTextureClient) {
|
||||
mDeprecatedTextureClient->OnActorDestroy();
|
||||
}
|
||||
if (mDeprecatedTextureClientOnWhite) {
|
||||
mDeprecatedTextureClientOnWhite->OnActorDestroy();
|
||||
}
|
||||
for (size_t i = 0; i < mOldTextures.Length(); ++i) {
|
||||
mOldTextures[i]->OnActorDestroy();
|
||||
}
|
||||
}
|
||||
|
||||
ContentClientDoubleBuffered::~ContentClientDoubleBuffered()
|
||||
{
|
||||
if (mDeprecatedTextureClient) {
|
||||
@ -441,26 +426,6 @@ ContentClientDoubleBuffered::SwapBuffers(const nsIntRegion& aFrontUpdatedRegion)
|
||||
ContentClientRemoteBuffer::SwapBuffers(aFrontUpdatedRegion);
|
||||
}
|
||||
|
||||
void
|
||||
ContentClientDoubleBuffered::OnActorDestroy()
|
||||
{
|
||||
if (mDeprecatedTextureClient) {
|
||||
mDeprecatedTextureClient->OnActorDestroy();
|
||||
}
|
||||
if (mDeprecatedTextureClientOnWhite) {
|
||||
mDeprecatedTextureClientOnWhite->OnActorDestroy();
|
||||
}
|
||||
for (size_t i = 0; i < mOldTextures.Length(); ++i) {
|
||||
mOldTextures[i]->OnActorDestroy();
|
||||
}
|
||||
if (mFrontClient) {
|
||||
mFrontClient->OnActorDestroy();
|
||||
}
|
||||
if (mFrontClientOnWhite) {
|
||||
mFrontClientOnWhite->OnActorDestroy();
|
||||
}
|
||||
}
|
||||
|
||||
struct AutoDeprecatedTextureClient {
|
||||
AutoDeprecatedTextureClient()
|
||||
: mTexture(nullptr)
|
||||
|
@ -163,8 +163,6 @@ public:
|
||||
MOZ_CRASH("Should not be called on non-remote ContentClient");
|
||||
}
|
||||
|
||||
virtual void OnActorDestroy() MOZ_OVERRIDE {}
|
||||
|
||||
private:
|
||||
BasicLayerManager* mManager;
|
||||
};
|
||||
@ -249,8 +247,6 @@ public:
|
||||
return mTextureInfo;
|
||||
}
|
||||
|
||||
virtual void OnActorDestroy() MOZ_OVERRIDE;
|
||||
|
||||
protected:
|
||||
virtual nsIntRegion GetUpdatedRegion(const nsIntRegion& aRegionToDraw,
|
||||
const nsIntRegion& aVisibleRegion,
|
||||
@ -314,8 +310,6 @@ protected:
|
||||
virtual void DestroyFrontBuffer() MOZ_OVERRIDE;
|
||||
virtual void LockFrontBuffer() MOZ_OVERRIDE;
|
||||
|
||||
virtual void OnActorDestroy() MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
void UpdateDestinationFrom(const RotatedBuffer& aSource,
|
||||
const nsIntRegion& aUpdateRegion);
|
||||
|
@ -268,25 +268,6 @@ ImageClientBuffered::UpdateImage(ImageContainer* aContainer,
|
||||
return ImageClientSingle::UpdateImage(aContainer, aContentFlags);
|
||||
}
|
||||
|
||||
void
|
||||
ImageClientSingle::OnActorDestroy()
|
||||
{
|
||||
if (mFrontBuffer) {
|
||||
mFrontBuffer->OnActorDestroy();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ImageClientBuffered::OnActorDestroy()
|
||||
{
|
||||
if (mFrontBuffer) {
|
||||
mFrontBuffer->OnActorDestroy();
|
||||
}
|
||||
if (mBackBuffer) {
|
||||
mBackBuffer->OnActorDestroy();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ImageClientSingle::AddTextureClient(TextureClient* aTexture)
|
||||
{
|
||||
@ -479,14 +460,6 @@ ImageClientBridge::ImageClientBridge(CompositableForwarder* aFwd,
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
DeprecatedImageClientSingle::OnActorDestroy()
|
||||
{
|
||||
if (mDeprecatedTextureClient) {
|
||||
mDeprecatedTextureClient->OnActorDestroy();
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
ImageClientBridge::UpdateImage(ImageContainer* aContainer, uint32_t aContentFlags)
|
||||
{
|
||||
|
@ -104,8 +104,6 @@ public:
|
||||
|
||||
virtual void FlushImage() MOZ_OVERRIDE;
|
||||
|
||||
virtual void OnActorDestroy() MOZ_OVERRIDE;
|
||||
|
||||
protected:
|
||||
RefPtr<TextureClient> mFrontBuffer;
|
||||
// Some layers may want to enforce some flags to all their textures
|
||||
@ -129,8 +127,6 @@ public:
|
||||
|
||||
virtual void FlushImage() MOZ_OVERRIDE;
|
||||
|
||||
virtual void OnActorDestroy() MOZ_OVERRIDE;
|
||||
|
||||
protected:
|
||||
RefPtr<TextureClient> mBackBuffer;
|
||||
};
|
||||
@ -175,8 +171,6 @@ public:
|
||||
virtual already_AddRefed<Image> CreateImage(const uint32_t *aFormats,
|
||||
uint32_t aNumFormats) MOZ_OVERRIDE;
|
||||
|
||||
virtual void OnActorDestroy() MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
RefPtr<DeprecatedTextureClient> mDeprecatedTextureClient;
|
||||
TextureInfo mTextureInfo;
|
||||
@ -218,8 +212,6 @@ public:
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
virtual void OnActorDestroy() MOZ_OVERRIDE {}
|
||||
|
||||
protected:
|
||||
uint64_t mAsyncContainerID;
|
||||
ShadowableLayer* mLayer;
|
||||
|
@ -191,10 +191,6 @@ public:
|
||||
|
||||
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() {}
|
||||
|
||||
protected:
|
||||
void AddFlags(TextureFlags aFlags)
|
||||
{
|
||||
@ -302,11 +298,6 @@ public:
|
||||
|
||||
ipc::Shmem& GetShmem() { return mShmem; }
|
||||
|
||||
virtual void OnActorDestroy() MOZ_OVERRIDE
|
||||
{
|
||||
mShmem = ipc::Shmem();
|
||||
}
|
||||
|
||||
protected:
|
||||
ipc::Shmem mShmem;
|
||||
ISurfaceAllocator* mAllocator;
|
||||
@ -483,13 +474,6 @@ public:
|
||||
|
||||
virtual gfxContentType GetContentType() = 0;
|
||||
|
||||
void OnActorDestroy()
|
||||
{
|
||||
if (mDescriptor.type() == SurfaceDescriptor::TShmem) {
|
||||
mDescriptor = SurfaceDescriptor();
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
DeprecatedTextureClient(CompositableForwarder* aForwarder,
|
||||
const TextureInfo& aTextureInfo);
|
||||
|
@ -201,14 +201,6 @@ public:
|
||||
static BasicTiledLayerBuffer OpenDescriptor(ISurfaceAllocator* aAllocator,
|
||||
const SurfaceDescriptorTiles& aDescriptor);
|
||||
|
||||
void OnActorDestroy()
|
||||
{
|
||||
for (size_t i = 0; i < mRetainedTiles.Length(); i++) {
|
||||
if (mRetainedTiles[i].IsPlaceholderTile()) continue;
|
||||
mRetainedTiles[i].mDeprecatedTextureClient->OnActorDestroy();
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
BasicTiledLayerTile ValidateTile(BasicTiledLayerTile aTile,
|
||||
const nsIntPoint& aTileRect,
|
||||
@ -298,12 +290,6 @@ public:
|
||||
};
|
||||
void LockCopyAndWrite(TiledBufferType aType);
|
||||
|
||||
virtual void OnActorDestroy() MOZ_OVERRIDE
|
||||
{
|
||||
mTiledBuffer.OnActorDestroy();
|
||||
mLowPrecisionTiledBuffer.OnActorDestroy();
|
||||
}
|
||||
|
||||
private:
|
||||
BasicTiledLayerBuffer mTiledBuffer;
|
||||
BasicTiledLayerBuffer mLowPrecisionTiledBuffer;
|
||||
|
@ -234,7 +234,6 @@ void
|
||||
CompositableParent::ActorDestroy(ActorDestroyReason why)
|
||||
{
|
||||
if (mHost) {
|
||||
mHost->OnActorDestroy();
|
||||
mHost->Detach();
|
||||
}
|
||||
}
|
||||
|
@ -106,12 +106,6 @@ public:
|
||||
mQuirks = aQuirks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Our IPDL actor is being destroyed, get rid of any shmem resources now and
|
||||
* don't worry about compositing anymore.
|
||||
*/
|
||||
virtual void OnActorDestroy() = 0;
|
||||
|
||||
// If base class overrides, it should still call the parent implementation
|
||||
virtual void SetCompositor(Compositor* aCompositor);
|
||||
|
||||
|
@ -52,23 +52,6 @@ ContentHostBase::DestroyFrontHost()
|
||||
mDeprecatedTextureHostOnWhite = nullptr;
|
||||
}
|
||||
|
||||
void
|
||||
ContentHostBase::OnActorDestroy()
|
||||
{
|
||||
if (mDeprecatedTextureHost) {
|
||||
mDeprecatedTextureHost->OnActorDestroy();
|
||||
}
|
||||
if (mDeprecatedTextureHostOnWhite) {
|
||||
mDeprecatedTextureHostOnWhite->OnActorDestroy();
|
||||
}
|
||||
if (mNewFrontHost) {
|
||||
mNewFrontHost->OnActorDestroy();
|
||||
}
|
||||
if (mNewFrontHostOnWhite) {
|
||||
mNewFrontHostOnWhite->OnActorDestroy();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ContentHostBase::Composite(EffectChain& aEffectChain,
|
||||
float aOpacity,
|
||||
@ -421,16 +404,19 @@ ContentHostDoubleBuffered::DestroyTextures()
|
||||
"We won't be able to destroy our SurfaceDescriptor");
|
||||
mNewFrontHost = nullptr;
|
||||
}
|
||||
|
||||
if (mNewFrontHostOnWhite) {
|
||||
MOZ_ASSERT(mNewFrontHostOnWhite->GetDeAllocator(),
|
||||
"We won't be able to destroy our SurfaceDescriptor");
|
||||
mNewFrontHostOnWhite = nullptr;
|
||||
}
|
||||
|
||||
if (mBackHost) {
|
||||
MOZ_ASSERT(mBackHost->GetDeAllocator(),
|
||||
"We won't be able to destroy our SurfaceDescriptor");
|
||||
mBackHost = nullptr;
|
||||
}
|
||||
|
||||
if (mBackHostOnWhite) {
|
||||
MOZ_ASSERT(mBackHostOnWhite->GetDeAllocator(),
|
||||
"We won't be able to destroy our SurfaceDescriptor");
|
||||
@ -440,29 +426,6 @@ ContentHostDoubleBuffered::DestroyTextures()
|
||||
// don't touch mDeprecatedTextureHost, we might need it for compositing
|
||||
}
|
||||
|
||||
void
|
||||
ContentHostDoubleBuffered::OnActorDestroy()
|
||||
{
|
||||
if (mDeprecatedTextureHost) {
|
||||
mDeprecatedTextureHost->OnActorDestroy();
|
||||
}
|
||||
if (mDeprecatedTextureHostOnWhite) {
|
||||
mDeprecatedTextureHostOnWhite->OnActorDestroy();
|
||||
}
|
||||
if (mNewFrontHost) {
|
||||
mNewFrontHost->OnActorDestroy();
|
||||
}
|
||||
if (mNewFrontHostOnWhite) {
|
||||
mNewFrontHostOnWhite->OnActorDestroy();
|
||||
}
|
||||
if (mBackHost) {
|
||||
mBackHost->OnActorDestroy();
|
||||
}
|
||||
if (mBackHostOnWhite) {
|
||||
mBackHostOnWhite->OnActorDestroy();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ContentHostDoubleBuffered::UpdateThebes(const ThebesBufferData& aData,
|
||||
const nsIntRegion& aUpdated,
|
||||
|
@ -128,8 +128,6 @@ public:
|
||||
// destroy our front buffer so that we can continue to composite.
|
||||
virtual void DestroyTextures() = 0;
|
||||
|
||||
virtual void OnActorDestroy() MOZ_OVERRIDE;
|
||||
|
||||
protected:
|
||||
virtual nsIntPoint GetOriginOffset()
|
||||
{
|
||||
@ -180,8 +178,6 @@ public:
|
||||
const TextureInfo& aTextureInfo) MOZ_OVERRIDE;
|
||||
virtual void DestroyTextures() MOZ_OVERRIDE;
|
||||
|
||||
virtual void OnActorDestroy() MOZ_OVERRIDE;
|
||||
|
||||
#ifdef MOZ_DUMP_PAINTING
|
||||
virtual void Dump(FILE* aFile=nullptr,
|
||||
const char* aPrefix="",
|
||||
|
@ -69,13 +69,6 @@ public:
|
||||
|
||||
virtual LayerRenderState GetRenderState() MOZ_OVERRIDE;
|
||||
|
||||
virtual void OnActorDestroy() MOZ_OVERRIDE
|
||||
{
|
||||
if (mFrontBuffer) {
|
||||
mFrontBuffer->OnActorDestroy();
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MOZ_LAYERS_HAVE_LOG
|
||||
virtual void PrintInfo(nsACString& aTo, const char* aPrefix);
|
||||
#endif
|
||||
@ -139,13 +132,6 @@ public:
|
||||
|
||||
virtual void SetCompositor(Compositor* aCompositor) MOZ_OVERRIDE;
|
||||
|
||||
virtual void OnActorDestroy() MOZ_OVERRIDE
|
||||
{
|
||||
if (mDeprecatedTextureHost) {
|
||||
mDeprecatedTextureHost->OnActorDestroy();
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MOZ_LAYERS_HAVE_LOG
|
||||
virtual void PrintInfo(nsACString& aTo, const char* aPrefix);
|
||||
#endif
|
||||
|
@ -244,15 +244,6 @@ DeprecatedTextureHost::SwapTextures(const SurfaceDescriptor& aImage,
|
||||
SetBuffer(mBuffer, mDeAllocator);
|
||||
}
|
||||
|
||||
void
|
||||
DeprecatedTextureHost::OnActorDestroy()
|
||||
{
|
||||
if (mBuffer && mBuffer->type() == SurfaceDescriptor::TShmem) {
|
||||
*mBuffer = SurfaceDescriptor();
|
||||
mBuffer = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MOZ_LAYERS_HAVE_LOG
|
||||
|
||||
void
|
||||
@ -520,13 +511,6 @@ ShmemTextureHost::DeallocateSharedData()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ShmemTextureHost::OnActorDestroy()
|
||||
{
|
||||
delete mShmem;
|
||||
mShmem = nullptr;
|
||||
}
|
||||
|
||||
uint8_t* ShmemTextureHost::GetBuffer()
|
||||
{
|
||||
return mShmem ? mShmem->get<uint8_t>() : nullptr;
|
||||
|
@ -384,10 +384,6 @@ public:
|
||||
|
||||
virtual void SetCompositableQuirks(CompositableQuirks* aQuirks);
|
||||
|
||||
// If a texture host holds a reference to shmem, it should override this method
|
||||
// to forget about the shmem _without_ releasing it.
|
||||
virtual void OnActorDestroy() {}
|
||||
|
||||
#ifdef MOZ_LAYERS_HAVE_LOG
|
||||
virtual const char *Name() { return "TextureHost"; }
|
||||
virtual void PrintInfo(nsACString& aTo, const char* aPrefix);
|
||||
@ -488,8 +484,6 @@ public:
|
||||
virtual const char *Name() MOZ_OVERRIDE { return "ShmemTextureHost"; }
|
||||
#endif
|
||||
|
||||
virtual void OnActorDestroy() MOZ_OVERRIDE;
|
||||
|
||||
protected:
|
||||
ipc::Shmem* mShmem;
|
||||
ISurfaceAllocator* mDeallocator;
|
||||
@ -724,8 +718,6 @@ public:
|
||||
// see bug 865908 about fixing this.
|
||||
virtual void ForgetBuffer() {}
|
||||
|
||||
void OnActorDestroy();
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Should be implemented by the backend-specific DeprecatedTextureHost classes
|
||||
|
@ -119,16 +119,6 @@ public:
|
||||
mCompositor = aCompositor;
|
||||
}
|
||||
|
||||
void OnActorDestroy()
|
||||
{
|
||||
Iterator end = TilesEnd();
|
||||
for (Iterator it = TilesBegin(); it != end; ++it) {
|
||||
if (it->mDeprecatedTextureHost) {
|
||||
it->mDeprecatedTextureHost->OnActorDestroy();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
TiledTexture ValidateTile(TiledTexture aTile,
|
||||
const nsIntPoint& aTileRect,
|
||||
@ -251,12 +241,6 @@ public:
|
||||
Compositor* aCompositor,
|
||||
AttachFlags aFlags = NO_FLAGS) MOZ_OVERRIDE;
|
||||
|
||||
virtual void OnActorDestroy() MOZ_OVERRIDE
|
||||
{
|
||||
mVideoMemoryTiledBuffer.OnActorDestroy();
|
||||
mLowPrecisionVideoMemoryTiledBuffer.OnActorDestroy();
|
||||
}
|
||||
|
||||
#ifdef MOZ_DUMP_PAINTING
|
||||
virtual void Dump(FILE* aFile=nullptr,
|
||||
const char* aPrefix="",
|
||||
|
Loading…
Reference in New Issue
Block a user