mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 944703 - Part 3: make TextureHost hold a strong reference to its ISurfaceAllocator - r=nical
This commit is contained in:
parent
9a9e188f86
commit
5139f05917
@ -261,11 +261,13 @@ DeprecatedTextureHost::PrintInfo(nsACString& aTo, const char* aPrefix)
|
||||
AppendToString(aTo, mFlags, " [flags=", "]");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
DeprecatedTextureHost::SetBuffer(SurfaceDescriptor* aBuffer, ISurfaceAllocator* aAllocator)
|
||||
{
|
||||
MOZ_ASSERT(!mBuffer || mBuffer == aBuffer, "Will leak the old mBuffer");
|
||||
mBuffer = aBuffer;
|
||||
mDeAllocator = aAllocator;
|
||||
}
|
||||
|
||||
BufferTextureHost::BufferTextureHost(uint64_t aID,
|
||||
gfx::SurfaceFormat aFormat,
|
||||
|
@ -488,7 +488,7 @@ public:
|
||||
|
||||
protected:
|
||||
mozilla::ipc::Shmem* mShmem;
|
||||
ISurfaceAllocator* mDeallocator;
|
||||
RefPtr<ISurfaceAllocator> mDeallocator;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -705,12 +705,7 @@ public:
|
||||
*/
|
||||
// only made virtual to allow overriding in GrallocDeprecatedTextureHostOGL, for hacky fix in gecko 23 for bug 862324.
|
||||
// see bug 865908 about fixing this.
|
||||
virtual void SetBuffer(SurfaceDescriptor* aBuffer, ISurfaceAllocator* aAllocator)
|
||||
{
|
||||
MOZ_ASSERT(!mBuffer || mBuffer == aBuffer, "Will leak the old mBuffer");
|
||||
mBuffer = aBuffer;
|
||||
mDeAllocator = aAllocator;
|
||||
}
|
||||
virtual void SetBuffer(SurfaceDescriptor* aBuffer, ISurfaceAllocator* aAllocator);
|
||||
|
||||
// used only for hacky fix in gecko 23 for bug 862324
|
||||
// see bug 865908 about fixing this.
|
||||
@ -762,7 +757,7 @@ protected:
|
||||
// which can go away under our feet at any time. This is the cause
|
||||
// of bug 862324 among others. Our current understanding is that
|
||||
// this will be gone in Gecko 24. See bug 858914.
|
||||
ISurfaceAllocator* mDeAllocator;
|
||||
RefPtr<ISurfaceAllocator> mDeAllocator;
|
||||
gfx::SurfaceFormat mFormat;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user